It ought to be a very rare thing that a close friendship is lost. That's because the relationship would be deep, your shared values extensive and fundamental, your attitudes and personalities suited, etc. Those things are slow to build up and even slower, if possible, to change.
What is more likely to happen is that you are surprised to discover you don't know your friend as well as you thought you did. That is a very real problem. We understand people based on analogy from our first-person knowledge of our own minds and personalities. We interpret what others do and say in light of that understanding, and it is quite possible to attribute to a friend more good or more consistency with our own views and motivations than is accurate. That, of course, opens the door to being too trusting of your friend, to false expectations, and then to disappointment of one sort or another.
When is that disappointment big enough to mean the end of the relationship? That really depends on the values implicit in the discovery. As a rough rule, if your new understanding of your friend's values and attitudes is such that you wouldn't pursue a close relationship with them had you known this about them, then it is time to back away.
Friendship is a very selfish thing. It isn't easy to detail or quantify what you are getting out of it precisely, but there is a kind of psychological double-take that happens when a friend acts out of what you thought was his character, and it is that sort of experience that signals a re-evaluation of your friendship is needed.
Friendships don't have to end dramatically. But if that's your choice, it is simply an act of self-interest to break it off. Aristotle said a friend is another self. And it isn't just anybody who can be another you.