DBTest.HardLimit made more deterministic

Summary: In DBTest.HardLimit, multiple flushes may merge into one, based on thread scheduling. Avoid it by waiting each flush to finish before generating the next one.

Test Plan: Run test in parallel several times and see it doesn't fail any more.

Reviewers: yhchiang, kradhakrishnan, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: yiwu, leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D56853
This commit is contained in:
sdong 2016-04-15 17:00:56 -07:00
parent 994d9bc82b
commit 6d436a3f85

View file

@ -8393,6 +8393,7 @@ TEST_F(DBTest, HardLimit) {
int key_idx = 0;
for (int num = 0; num < 5; num++) {
GenerateNewFile(&rnd, &key_idx, true);
dbfull()->TEST_WaitForFlushMemTable();
}
ASSERT_EQ(0, callback_count.load());