@@ -1325,6 +1325,7 @@ TEST(DBTest, IndexAndFilterBlocksOfNewTableAddedToCache) {
1325
1325
1326
1326
TEST (DBTest, GetPropertiesOfAllTablesTest) {
1327
1327
Options options = CurrentOptions ();
1328
+ options.max_background_flushes = 0 ;
1328
1329
Reopen (&options);
1329
1330
// Create 4 tables
1330
1331
for (int table = 0 ; table < 4 ; ++table) {
@@ -1520,7 +1521,10 @@ TEST(DBTest, GetPicksCorrectFile) {
1520
1521
1521
1522
TEST (DBTest, GetEncountersEmptyLevel) {
1522
1523
do {
1523
- CreateAndReopenWithCF ({" pikachu" });
1524
+ Options options = CurrentOptions ();
1525
+ options.max_background_flushes = 0 ;
1526
+ options.disableDataSync = true ;
1527
+ CreateAndReopenWithCF ({" pikachu" }, &options);
1524
1528
// Arrange for the following to happen:
1525
1529
// * sstable A in level 0
1526
1530
// * nothing in level 1
@@ -5124,7 +5128,9 @@ TEST(DBTest, Snapshot) {
5124
5128
5125
5129
TEST (DBTest, HiddenValuesAreRemoved) {
5126
5130
do {
5127
- CreateAndReopenWithCF ({" pikachu" });
5131
+ Options options = CurrentOptions ();
5132
+ options.max_background_flushes = 0 ;
5133
+ CreateAndReopenWithCF ({" pikachu" }, &options);
5128
5134
Random rnd (301 );
5129
5135
FillLevels (" a" , " z" , 1 );
5130
5136
@@ -5215,7 +5221,9 @@ TEST(DBTest, CompactBetweenSnapshots) {
5215
5221
}
5216
5222
5217
5223
TEST (DBTest, DeletionMarkers1) {
5218
- CreateAndReopenWithCF ({" pikachu" });
5224
+ Options options = CurrentOptions ();
5225
+ options.max_background_flushes = 0 ;
5226
+ CreateAndReopenWithCF ({" pikachu" }, &options);
5219
5227
Put (1 , " foo" , " v1" );
5220
5228
ASSERT_OK (Flush (1 ));
5221
5229
const int last = CurrentOptions ().max_mem_compaction_level ;
@@ -5250,7 +5258,9 @@ TEST(DBTest, DeletionMarkers1) {
5250
5258
}
5251
5259
5252
5260
TEST (DBTest, DeletionMarkers2) {
5253
- CreateAndReopenWithCF ({" pikachu" });
5261
+ Options options = CurrentOptions ();
5262
+ options.max_background_flushes = 0 ;
5263
+ CreateAndReopenWithCF ({" pikachu" }, &options);
5254
5264
Put (1 , " foo" , " v1" );
5255
5265
ASSERT_OK (Flush (1 ));
5256
5266
const int last = CurrentOptions ().max_mem_compaction_level ;
@@ -5279,7 +5289,9 @@ TEST(DBTest, DeletionMarkers2) {
5279
5289
5280
5290
TEST (DBTest, OverlapInLevel0) {
5281
5291
do {
5282
- CreateAndReopenWithCF ({" pikachu" });
5292
+ Options options = CurrentOptions ();
5293
+ options.max_background_flushes = 0 ;
5294
+ CreateAndReopenWithCF ({" pikachu" }, &options);
5283
5295
int tmp = CurrentOptions ().max_mem_compaction_level ;
5284
5296
ASSERT_EQ (tmp, 2 ) << " Fix test to match config" ;
5285
5297
@@ -5457,7 +5469,9 @@ TEST(DBTest, CustomComparator) {
5457
5469
}
5458
5470
5459
5471
TEST (DBTest, ManualCompaction) {
5460
- CreateAndReopenWithCF ({" pikachu" });
5472
+ Options options = CurrentOptions ();
5473
+ options.max_background_flushes = 0 ;
5474
+ CreateAndReopenWithCF ({" pikachu" }, &options);
5461
5475
ASSERT_EQ (dbfull ()->MaxMemCompactionLevel (), 2 )
5462
5476
<< " Need to update this test to match kMaxMemCompactLevel" ;
5463
5477
@@ -5495,6 +5509,7 @@ TEST(DBTest, ManualCompaction) {
5495
5509
5496
5510
if (iter == 0 ) {
5497
5511
Options options = CurrentOptions ();
5512
+ options.max_background_flushes = 0 ;
5498
5513
options.num_levels = 3 ;
5499
5514
options.create_if_missing = true ;
5500
5515
DestroyAndReopen (&options);
@@ -5594,6 +5609,7 @@ TEST(DBTest, DBOpen_Options) {
5594
5609
TEST (DBTest, DBOpen_Change_NumLevels) {
5595
5610
Options opts;
5596
5611
opts.create_if_missing = true ;
5612
+ opts.max_background_flushes = 0 ;
5597
5613
DestroyAndReopen (&opts);
5598
5614
ASSERT_TRUE (db_ != nullptr );
5599
5615
CreateAndReopenWithCF ({" pikachu" }, &opts);
@@ -5777,6 +5793,7 @@ TEST(DBTest, ManifestWriteError) {
5777
5793
options.env = env_;
5778
5794
options.create_if_missing = true ;
5779
5795
options.error_if_exists = false ;
5796
+ options.max_background_flushes = 0 ;
5780
5797
DestroyAndReopen (&options);
5781
5798
ASSERT_OK (Put (" foo" , " bar" ));
5782
5799
ASSERT_EQ (" bar" , Get (" foo" ));
0 commit comments