Relax FlushSchedule test
Summary: The test makes sure that we don't call flush too often. For that, it's ok to check if we have less than 10 table files. Otherwise, the test is flaky because it's hard to estimate number of entries in the memtable before it gets flushed (any ideas?) Test Plan: Still works, but hopefully less flaky. Reviewers: ljin, sdong, yhchiang Reviewed by: yhchiang Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D23241
This commit is contained in:
parent
3d9e6f7759
commit
d1f24dc7ee
@ -2817,10 +2817,12 @@ TEST(DBTest, FlushSchedule) {
|
||||
t.join();
|
||||
}
|
||||
|
||||
ASSERT_EQ(GetNumberOfSstFilesForColumnFamily(db_, "default"),
|
||||
static_cast<uint64_t>(10));
|
||||
ASSERT_EQ(GetNumberOfSstFilesForColumnFamily(db_, "pikachu"),
|
||||
static_cast<uint64_t>(10));
|
||||
auto default_tables = GetNumberOfSstFilesForColumnFamily(db_, "default");
|
||||
auto pikachu_tables = GetNumberOfSstFilesForColumnFamily(db_, "pikachu");
|
||||
ASSERT_LE(default_tables, static_cast<uint64_t>(10));
|
||||
ASSERT_GT(default_tables, static_cast<uint64_t>(0));
|
||||
ASSERT_LE(pikachu_tables, static_cast<uint64_t>(10));
|
||||
ASSERT_GT(pikachu_tables, static_cast<uint64_t>(0));
|
||||
}
|
||||
|
||||
TEST(DBTest, MinorCompactionsHappen) {
|
||||
|
Loading…
Reference in New Issue
Block a user