[Misc] Attempt to fix a flickering test.

(cherry picked from commit f3f5c3477f4b47789c47e0e6390c05e0ce75cc41)