From 6d436a3f85425e7658e8ec5ae809538b57001265 Mon Sep 17 00:00:00 2001 From: sdong Date: Fri, 15 Apr 2016 17:00:56 -0700 Subject: [PATCH] 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 --- db/db_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/db_test.cc b/db/db_test.cc index 52e7b8dbb8..70c0646f05 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -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());