[misc] Fix flickering test.

(cherry picked from commit 757a202843f095c563c93406033aad58d66ae49a)