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
This commit is contained in:
hta@webrtc.org 2013-04-09 12:36:28 +00:00
parent a5f1787f63
commit a701c0ed03

View File

@ -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;