This is an excerpt from a great talk by Elder Richard G. Scott:
"Even if you exercise your strongest faith, God will not always reward you immediately according to your desires. Rather, God will respond with what in His eternal plan is best for you. He loves you to a depth and completeness you cannot conceive of in your mortal state. Indeed, were you to know His entire plan, you would never ask for that which is contrary to it even though your feelings tempt you to do so. Sincere faith gives understanding and strength to accept the will of our Heavenly Father when it differs from our own. We can accept His will with peace and assurance, confident that His infinite wisdom surpasses our own ability to comprehend fully His plan as it unfolds a piece at a time.
Faith is not just push a button and you get the answer. The Lord declared, “As many as I love, I
rebuke and chasten: be zealous therefore, and repent.” Brigham Young observed, “God never bestows upon his people, or upon an individual, superior blessings without a severe trial to prove them.” Personally, for some vital decisions I have experienced the grueling, anguishing struggle that precedes a confirming answer. Yet those trying experiences have been edifying. It is comforting to know that God will never try you more than you can manage with His help".
(Richard G. Scott, “The Sustaining Power of Faith in Times of Uncertainty and Testing,” Ensign, May 2003)