@@ -73,7 +73,7 @@ class ColumnFamilyTestBase : public testing::Test {
73
73
db_options_.create_if_missing = true ;
74
74
db_options_.fail_if_options_file_error = true ;
75
75
db_options_.env = env_;
76
- DestroyDB (dbname_, Options (db_options_, column_family_options_));
76
+ EXPECT_OK ( DestroyDB (dbname_, Options (db_options_, column_family_options_) ));
77
77
}
78
78
79
79
~ColumnFamilyTestBase () override {
@@ -653,8 +653,8 @@ TEST_P(FlushEmptyCFTestWithParam, FlushEmptyCFTest) {
653
653
// after flushing file B is deleted. At the same time, the min log number of
654
654
// default CF is not written to manifest. Log file A still remains.
655
655
// Flushed to SST file Y.
656
- Flush (1 );
657
- Flush (0 );
656
+ ASSERT_OK ( Flush (1 ) );
657
+ ASSERT_OK ( Flush (0 ) );
658
658
ASSERT_OK (Put (1 , " bar" , " v3" )); // seqID 4
659
659
ASSERT_OK (Put (1 , " foo" , " v4" )); // seqID 5
660
660
ASSERT_OK (db_->FlushWAL (/* sync=*/ false ));
@@ -708,15 +708,15 @@ TEST_P(FlushEmptyCFTestWithParam, FlushEmptyCFTest2) {
708
708
// and is set to current. Both CFs' min log number is set to file C so after
709
709
// flushing file B is deleted. Log file A still remains.
710
710
// Flushed to SST file Y.
711
- Flush (1 );
711
+ ASSERT_OK ( Flush (1 ) );
712
712
ASSERT_OK (Put (0 , " bar" , " v2" )); // seqID 4
713
713
ASSERT_OK (Put (2 , " bar" , " v2" )); // seqID 5
714
714
ASSERT_OK (Put (1 , " bar" , " v3" )); // seqID 6
715
715
// Flushing all column families. This forces all CFs' min log to current. This
716
716
// is written to the manifest file. Log file C is cleared.
717
- Flush (0 );
718
- Flush (1 );
719
- Flush (2 );
717
+ ASSERT_OK ( Flush (0 ) );
718
+ ASSERT_OK ( Flush (1 ) );
719
+ ASSERT_OK ( Flush (2 ) );
720
720
// Write to log file D
721
721
ASSERT_OK (Put (1 , " bar" , " v4" )); // seqID 7
722
722
ASSERT_OK (Put (1 , " bar" , " v5" )); // seqID 8
@@ -985,7 +985,7 @@ TEST_P(ColumnFamilyTest, FlushTest) {
985
985
for (int i = 0 ; i < 3 ; ++i) {
986
986
uint64_t max_total_in_memory_state =
987
987
MaxTotalInMemoryState ();
988
- Flush (i);
988
+ ASSERT_OK ( Flush (i) );
989
989
AssertMaxTotalInMemoryState (max_total_in_memory_state);
990
990
}
991
991
ASSERT_OK (Put (1 , " foofoo" , " bar" ));
@@ -1093,7 +1093,7 @@ TEST_P(ColumnFamilyTest, CrashAfterFlush) {
1093
1093
ASSERT_OK (batch.Put (handles_[0 ], Slice (" foo" ), Slice (" bar" )));
1094
1094
ASSERT_OK (batch.Put (handles_[1 ], Slice (" foo" ), Slice (" bar" )));
1095
1095
ASSERT_OK (db_->Write (WriteOptions (), &batch));
1096
- Flush (0 );
1096
+ ASSERT_OK ( Flush (0 ) );
1097
1097
fault_env->SetFilesystemActive (false );
1098
1098
1099
1099
std::vector<std::string> names;
@@ -1103,7 +1103,7 @@ TEST_P(ColumnFamilyTest, CrashAfterFlush) {
1103
1103
}
1104
1104
}
1105
1105
Close ();
1106
- fault_env->DropUnsyncedFileData ();
1106
+ ASSERT_OK ( fault_env->DropUnsyncedFileData () );
1107
1107
fault_env->ResetState ();
1108
1108
Open (names, {});
1109
1109
@@ -2236,7 +2236,7 @@ TEST_P(ColumnFamilyTest, FlushStaleColumnFamilies) {
2236
2236
// files for column family [one], because it's empty
2237
2237
AssertCountLiveFiles (4 );
2238
2238
2239
- Flush (0 );
2239
+ ASSERT_OK ( Flush (0 ) );
2240
2240
ASSERT_EQ (0 , dbfull ()->TEST_total_log_size ());
2241
2241
Close ();
2242
2242
}
@@ -3040,7 +3040,7 @@ TEST_P(ColumnFamilyTest, IteratorCloseWALFile1) {
3040
3040
Iterator* it = db_->NewIterator (ReadOptions (), handles_[1 ]);
3041
3041
ASSERT_OK (it->status ());
3042
3042
// A flush will make `it` hold the last reference of its super version.
3043
- Flush (1 );
3043
+ ASSERT_OK ( Flush (1 ) );
3044
3044
3045
3045
ASSERT_OK (Put (1 , " fodor" , " mirko" ));
3046
3046
ASSERT_OK (Put (0 , " fodor" , " mirko" ));
@@ -3093,7 +3093,7 @@ TEST_P(ColumnFamilyTest, IteratorCloseWALFile2) {
3093
3093
Iterator* it = db_->NewIterator (ro, handles_[1 ]);
3094
3094
ASSERT_OK (it->status ());
3095
3095
// A flush will make `it` hold the last reference of its super version.
3096
- Flush (1 );
3096
+ ASSERT_OK ( Flush (1 ) );
3097
3097
3098
3098
ASSERT_OK (Put (1 , " fodor" , " mirko" ));
3099
3099
ASSERT_OK (Put (0 , " fodor" , " mirko" ));
@@ -3147,7 +3147,7 @@ TEST_P(ColumnFamilyTest, ForwardIteratorCloseWALFile) {
3147
3147
CreateColumnFamilies ({" one" });
3148
3148
ASSERT_OK (Put (1 , " fodor" , " mirko" ));
3149
3149
ASSERT_OK (Put (1 , " fodar2" , " mirko" ));
3150
- Flush (1 );
3150
+ ASSERT_OK ( Flush (1 ) );
3151
3151
3152
3152
// Create an iterator holding the current super version, as well as
3153
3153
// the SST file just flushed.
@@ -3159,7 +3159,7 @@ TEST_P(ColumnFamilyTest, ForwardIteratorCloseWALFile) {
3159
3159
3160
3160
ASSERT_OK (Put (1 , " fodor" , " mirko" ));
3161
3161
ASSERT_OK (Put (1 , " fodar2" , " mirko" ));
3162
- Flush (1 );
3162
+ ASSERT_OK ( Flush (1 ) );
3163
3163
3164
3164
WaitForCompaction ();
3165
3165
@@ -3232,9 +3232,9 @@ TEST_P(ColumnFamilyTest, LogSyncConflictFlush) {
3232
3232
ROCKSDB_NAMESPACE::port::Thread thread ([&] { ASSERT_OK (db_->SyncWAL ()); });
3233
3233
3234
3234
TEST_SYNC_POINT (" ColumnFamilyTest::LogSyncConflictFlush:1" );
3235
- Flush (1 );
3235
+ ASSERT_OK ( Flush (1 ) );
3236
3236
ASSERT_OK (Put (1 , " foo" , " bar" ));
3237
- Flush (1 );
3237
+ ASSERT_OK ( Flush (1 ) );
3238
3238
3239
3239
TEST_SYNC_POINT (" ColumnFamilyTest::LogSyncConflictFlush:2" );
3240
3240
@@ -3256,7 +3256,7 @@ TEST_P(ColumnFamilyTest, DISABLED_LogTruncationTest) {
3256
3256
Build (0 , 100 );
3257
3257
3258
3258
// Flush the 0th column family to force a roll of the wal log
3259
- Flush (0 );
3259
+ ASSERT_OK ( Flush (0 ) );
3260
3260
3261
3261
// Add some more entries
3262
3262
Build (100 , 100 );
@@ -3332,14 +3332,14 @@ TEST_P(ColumnFamilyTest, DefaultCfPathsTest) {
3332
3332
3333
3333
// Fill Column family 1.
3334
3334
PutRandomData (1 , 100 , 100 );
3335
- Flush (1 );
3335
+ ASSERT_OK ( Flush (1 ) );
3336
3336
3337
3337
ASSERT_EQ (1 , GetSstFileCount (cf_opt1.cf_paths [0 ].path ));
3338
3338
ASSERT_EQ (0 , GetSstFileCount (dbname_));
3339
3339
3340
3340
// Fill column family 2
3341
3341
PutRandomData (2 , 100 , 100 );
3342
- Flush (2 );
3342
+ ASSERT_OK ( Flush (2 ) );
3343
3343
3344
3344
// SST from Column family 2 should be generated in
3345
3345
// db_paths which is dbname_ in this case.
@@ -3358,14 +3358,14 @@ TEST_P(ColumnFamilyTest, MultipleCFPathsTest) {
3358
3358
Reopen ({ColumnFamilyOptions (), cf_opt1, cf_opt2});
3359
3359
3360
3360
PutRandomData (1 , 100 , 100 , true /* save */ );
3361
- Flush (1 );
3361
+ ASSERT_OK ( Flush (1 ) );
3362
3362
3363
3363
// Check that files are generated in appropriate paths.
3364
3364
ASSERT_EQ (1 , GetSstFileCount (cf_opt1.cf_paths [0 ].path ));
3365
3365
ASSERT_EQ (0 , GetSstFileCount (dbname_));
3366
3366
3367
3367
PutRandomData (2 , 100 , 100 , true /* save */ );
3368
- Flush (2 );
3368
+ ASSERT_OK ( Flush (2 ) );
3369
3369
3370
3370
ASSERT_EQ (1 , GetSstFileCount (cf_opt2.cf_paths [0 ].path ));
3371
3371
ASSERT_EQ (0 , GetSstFileCount (dbname_));
0 commit comments