From a701c0ed0390b79b9b68383c539e23a8da117a6d Mon Sep 17 00:00:00 2001 From: "hta@webrtc.org" Date: Tue, 9 Apr 2013 12:36:28 +0000 Subject: [PATCH] Fixing the flakiness of ThreadWakesTwice. TESTED=ran the test 10.000 times with machine load. BUG=1270 Review URL: https://webrtc-codereview.appspot.com/1303004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3795 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/system_wrappers/source/critical_section_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;