Summary:
Sometime we have such unit-test failure
```
folly/futures/test/TimekeeperTest.cpp:134: Failure
Value of: flag
Actual: false
Expected: true
```
This diff should make it less flaky, though I am not sure what's the best way to fix this flaky unit-test.
Reviewed By: yfeldblum
Differential Revision:
D3889630
fbshipit-source-id:
e7486d75fbcb3081d06724d213d4a2cf8942955d
TEST(Timekeeper, onTimeout) {
bool flag = false;
- makeFuture(42).delayed(one_ms)
+ makeFuture(42).delayed(10 * one_ms)
.onTimeout(zero_ms, [&]{ flag = true; return -1; })
.get();
EXPECT_TRUE(flag);
TEST(Timekeeper, onTimeoutReturnsFuture) {
bool flag = false;
- makeFuture(42).delayed(one_ms)
+ makeFuture(42).delayed(10 * one_ms)
.onTimeout(zero_ms, [&]{ flag = true; return makeFuture(-1); })
.get();
EXPECT_TRUE(flag);