Ordeals provide psychological pressures upon the mind, so as to push the ego to the forefront. If we are not observant, we will not catch our defects in action, nor take advantage of the psychological gymnasium provided to us by Lucifer.
Therefore, meditate and retrospect at the end of each day to comprehend more and more the egos you witness. Pray for elimination. This is how we conquer ordeals and no longer repeat mistakes.
For thirty years I sought God. But when I looked carefully I found that in reality God was the seeker and I the sought. -Bayazid al-Bastami