提交 d63ae5cb 编写于 作者: I Igor Canadi

Adjust memtable sizes in unit test

上级 64904b39
......@@ -731,10 +731,12 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[0]);
ASSERT_EQ(NumTableFilesAtLevel(0, 0), 0);
ASSERT_EQ(NumTableFilesAtLevel(1, 0), 0);
// write some new keys into level 0
PutRandomData(0, 120, 4096);
// write some new keys into level 0 and 1
PutRandomData(0, 1024, 512);
ASSERT_OK(Flush(0));
WaitForCompaction();
PutRandomData(0, 10, 512);
ASSERT_OK(Flush(0));
// remember number of files in each level
int l1 = NumTableFilesAtLevel(0, 0);
int l2 = NumTableFilesAtLevel(1, 0);
......@@ -745,14 +747,14 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
// SETUP column family "one" -- universal style
for (int i = 0; i < one.level0_file_num_compaction_trigger - 1; ++i) {
PutRandomData(1, 20, 10000);
PutRandomData(1, 11, 10000);
WaitForFlush(1);
ASSERT_EQ(std::to_string(i + 1), FilesPerLevel(1));
}
// SETUP column family "two" -- level style with 4 levels
for (int i = 0; i < two.level0_file_num_compaction_trigger - 1; ++i) {
PutRandomData(2, 20, 10000);
PutRandomData(2, 15, 10000);
WaitForFlush(2);
ASSERT_EQ(std::to_string(i + 1), FilesPerLevel(2));
}
......@@ -767,7 +769,7 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
PutRandomData(1, 12, 10000);
// TRIGGER compaction "two"
PutRandomData(2, 12, 10000);
PutRandomData(2, 10, 10000);
// WAIT for compactions
WaitForCompaction();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册