Improve the robustness of ThreadStatusSingleCompaction
Summary: Improve the robustness of ThreadStatusSingleCompaction by ensuring the number of files flushed in the test. Test Plan: export ROCKSDB_TESTS=ThreadStatus ./db_test Reviewers: sdong, igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D35019
This commit is contained in:
parent
8c12426c93
commit
c1b3cde18a
@ -10176,10 +10176,13 @@ TEST(DBTest, ThreadStatusSingleCompaction) {
|
|||||||
DestroyAndReopen(options);
|
DestroyAndReopen(options);
|
||||||
|
|
||||||
Random rnd(301);
|
Random rnd(301);
|
||||||
for (int key = kEntriesPerBuffer * kNumL0Files; key >= 0; --key) {
|
for (int file = 0; file < kNumL0Files; ++file) {
|
||||||
ASSERT_OK(Put(ToString(key), RandomString(&rnd, kTestValueSize)));
|
for (int key = 0; key < kEntriesPerBuffer; ++key) {
|
||||||
|
ASSERT_OK(Put(ToString(key + file * kEntriesPerBuffer),
|
||||||
|
RandomString(&rnd, kTestValueSize)));
|
||||||
|
}
|
||||||
|
Flush();
|
||||||
}
|
}
|
||||||
Flush();
|
|
||||||
ASSERT_GE(NumTableFilesAtLevel(0),
|
ASSERT_GE(NumTableFilesAtLevel(0),
|
||||||
options.level0_file_num_compaction_trigger);
|
options.level0_file_num_compaction_trigger);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user