@@ -731,10 +731,12 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
731
731
dbfull ()->TEST_CompactRange (1 , nullptr , nullptr , handles_[0 ]);
732
732
ASSERT_EQ (NumTableFilesAtLevel (0 , 0 ), 0 );
733
733
ASSERT_EQ (NumTableFilesAtLevel (1 , 0 ), 0 );
734
- // write some new keys into level 0
735
- PutRandomData (0 , 120 , 4096 );
734
+ // write some new keys into level 0 and 1
735
+ PutRandomData (0 , 1024 , 512 );
736
736
ASSERT_OK (Flush (0 ));
737
737
WaitForCompaction ();
738
+ PutRandomData (0 , 10 , 512 );
739
+ ASSERT_OK (Flush (0 ));
738
740
// remember number of files in each level
739
741
int l1 = NumTableFilesAtLevel (0 , 0 );
740
742
int l2 = NumTableFilesAtLevel (1 , 0 );
@@ -745,14 +747,14 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
745
747
746
748
// SETUP column family "one" -- universal style
747
749
for (int i = 0 ; i < one.level0_file_num_compaction_trigger - 1 ; ++i) {
748
- PutRandomData (1 , 20 , 10000 );
750
+ PutRandomData (1 , 11 , 10000 );
749
751
WaitForFlush (1 );
750
752
ASSERT_EQ (std::to_string (i + 1 ), FilesPerLevel (1 ));
751
753
}
752
754
753
755
// SETUP column family "two" -- level style with 4 levels
754
756
for (int i = 0 ; i < two.level0_file_num_compaction_trigger - 1 ; ++i) {
755
- PutRandomData (2 , 20 , 10000 );
757
+ PutRandomData (2 , 15 , 10000 );
756
758
WaitForFlush (2 );
757
759
ASSERT_EQ (std::to_string (i + 1 ), FilesPerLevel (2 ));
758
760
}
@@ -767,7 +769,7 @@ TEST(ColumnFamilyTest, DifferentCompactionStyles) {
767
769
PutRandomData (1 , 12 , 10000 );
768
770
769
771
// TRIGGER compaction "two"
770
- PutRandomData (2 , 12 , 10000 );
772
+ PutRandomData (2 , 10 , 10000 );
771
773
772
774
// WAIT for compactions
773
775
WaitForCompaction ();
0 commit comments