It will mostly depend on you. If you have a realistic idea of what marriage is about, select the right partner and both of you keep putting into the relationship, it will work.
The euphoria that you feel at the beginning will gradually give way to a daily routine. Both of you will have to learn to live with each other's aggravating little habits. He leaves his socks on the floor. She's not interested in the stuff he talks about with his friends. He spends his money on useless stuff and she wants to save. There are thousands of issues that come up. If you have unrealistic expectations, they can make life difficult.
Much will depend on communication. If you can tell each other how you feel about things and really listen to each other, all of those trivial issues can be overcome. If either person is rigid in your thinking and expect the other to always do things your way, you may not be able to conquer that headwind.
Don't let the emotional high you feel at the start fool you. If you see things in the other person you can't tolerate, it's just going to be more of a problem if you get married.
And most important, make sure both of you clearly understand the meaning of the word "commitment."