In reply to Subhra Bera:
Impossible to answer without knowing the timing of the data you are trying to compare, but most likely a race condition.
The purpose of the check_phase is to do comparisons after the test has finished executing, so it might be more appropriate to do the check there.