diff --git a/webrtc/system_wrappers/source/critical_section_unittest.cc b/webrtc/system_wrappers/source/critical_section_unittest.cc index 9d69e4f7a..1e4f66530 100644 --- a/webrtc/system_wrappers/source/critical_section_unittest.cc +++ b/webrtc/system_wrappers/source/critical_section_unittest.cc @@ -138,7 +138,7 @@ TEST_F(CritSectTest, ThreadWakesTwice) { thread->SetNotAlive(); // Tell thread to exit once run function finishes. SwitchProcess(); - EXPECT_LT(count_before, count.Count()); + EXPECT_TRUE(WaitForCount(count_before + 1, &count)); EXPECT_TRUE(thread->Stop()); delete thread; delete crit_sect;