Skip to content

Commit 623e519

Browse files
Jaesoo Leefacebook-github-bot
authored andcommitted
fix flaky unit test MockSingleThreadJobScheduler.Run
Summary: This change fixes the unit test MockSingleThreadJobScheduler.Run which is flaky (e.g, https://fburl.com/testinfra/bocbnkui). The reason for failures are that the main thread checks the stats before the job just unblocked by SeqPoints returns and is completed. The test was timing dependent. Reviewed By: therealgymmy Differential Revision: D49478329 fbshipit-source-id: ffae0df67858f216e0165be45bf314da6227fec8
1 parent 94bb78d commit 623e519

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cachelib/navy/testing/tests/MockJobSchedulerTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ TEST(MockSingleThreadJobScheduler, Run) {
144144
sp.wait(0);
145145
sp.wait(1);
146146
sp.wait(2);
147+
ex.finish();
147148
EXPECT_EQ(3, ex.getDoneCount());
148149
}
149150
} // namespace tests

0 commit comments

Comments
 (0)