Make CallAfterTimeoutTest less flaky
This commit is contained in:
parent
21059bc0fb
commit
f8260ce45f
@ -49,12 +49,12 @@ TEST_F(CallAfterTimeoutTest, DoesntCallTwice) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(CallAfterTimeoutTest, OneReset) {
|
TEST_F(CallAfterTimeoutTest, OneReset) {
|
||||||
auto obj = callAfterTimeout(milliseconds(100));
|
auto obj = callAfterTimeout(milliseconds(200));
|
||||||
sleep_for(milliseconds(75));
|
sleep_for(milliseconds(125));
|
||||||
obj->resetTimer();
|
obj->resetTimer();
|
||||||
sleep_for(milliseconds(75));
|
sleep_for(milliseconds(125));
|
||||||
EXPECT_FALSE(called);
|
EXPECT_FALSE(called);
|
||||||
sleep_for(milliseconds(75));
|
sleep_for(milliseconds(125));
|
||||||
EXPECT_TRUE(called);
|
EXPECT_TRUE(called);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user