Commit 28962b90 authored by Patryk Zaryjewski's avatar Patryk Zaryjewski Committed by Facebook Github Bot

Fix flaky test.

Summary: Flakyness was caused by a small chance that the function would still be in the heap when adding a function. Increased delay to 3 seconds.

Reviewed By: yfeldblum

Differential Revision: D6855408

fbshipit-source-id: 47d4035698a5d14a7ed71902656210f0e17b0b5d
parent 0e60f61d
......@@ -264,7 +264,7 @@ TEST(FunctionScheduler, ResetFunc2) {
fs.addFunctionOnce([&] { total += 3; }, "add6", testInterval(2));
delay(1);
EXPECT_TRUE(fs.resetFunctionTimer("add4"));
delay(2);
delay(3);
EXPECT_FALSE(fs.resetFunctionTimer("add3"));
fs.addFunctionOnce([&] { total += 3; }, "add4", testInterval(1));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment