@@ -2201,6 +2201,8 @@ TEST_F(DBBasicTest, MultiGetIOBufferOverrun) {
22012201
22022202TEST_F (DBBasicTest, IncrementalRecoveryNoCorrupt) {
22032203 Options options = CurrentOptions ();
2204+ options.file_checksum_gen_factory =
2205+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
22042206 DestroyAndReopen (options);
22052207 CreateAndReopenWithCF ({" pikachu" , " eevee" }, options);
22062208 size_t num_cfs = handles_.size ();
@@ -2239,6 +2241,8 @@ TEST_F(DBBasicTest, IncrementalRecoveryNoCorrupt) {
22392241
22402242TEST_F (DBBasicTest, BestEffortsRecoveryWithVersionBuildingFailure) {
22412243 Options options = CurrentOptions ();
2244+ options.file_checksum_gen_factory =
2245+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
22422246 DestroyAndReopen (options);
22432247 ASSERT_OK (Put (" foo" , " value" ));
22442248 ASSERT_OK (Flush ());
@@ -2285,6 +2289,8 @@ TEST_F(DBBasicTest, RecoverWithMissingFiles) {
22852289 // Disable auto compaction to simplify SST file name tracking.
22862290 options.disable_auto_compactions = true ;
22872291 options.listeners .emplace_back (listener);
2292+ options.file_checksum_gen_factory =
2293+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
22882294 CreateAndReopenWithCF ({" pikachu" , " eevee" }, options);
22892295 std::vector<std::string> all_cf_names = {kDefaultColumnFamilyName , " pikachu" ,
22902296 " eevee" };
@@ -2345,6 +2351,8 @@ TEST_F(DBBasicTest, RecoverWithMissingFiles) {
23452351
23462352TEST_F (DBBasicTest, BestEffortsRecoveryTryMultipleManifests) {
23472353 Options options = CurrentOptions ();
2354+ options.file_checksum_gen_factory =
2355+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
23482356 options.env = env_;
23492357 DestroyAndReopen (options);
23502358 ASSERT_OK (Put (" foo" , " value0" ));
@@ -2371,6 +2379,8 @@ TEST_F(DBBasicTest, BestEffortsRecoveryTryMultipleManifests) {
23712379
23722380TEST_F (DBBasicTest, RecoverWithNoCurrentFile) {
23732381 Options options = CurrentOptions ();
2382+ options.file_checksum_gen_factory =
2383+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
23742384 options.env = env_;
23752385 DestroyAndReopen (options);
23762386 CreateAndReopenWithCF ({" pikachu" }, options);
@@ -2394,6 +2404,8 @@ TEST_F(DBBasicTest, RecoverWithNoCurrentFile) {
23942404
23952405TEST_F (DBBasicTest, RecoverWithNoManifest) {
23962406 Options options = CurrentOptions ();
2407+ options.file_checksum_gen_factory =
2408+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
23972409 options.env = env_;
23982410 DestroyAndReopen (options);
23992411 ASSERT_OK (Put (" foo" , " value" ));
@@ -2423,6 +2435,8 @@ TEST_F(DBBasicTest, RecoverWithNoManifest) {
24232435
24242436TEST_F (DBBasicTest, SkipWALIfMissingTableFiles) {
24252437 Options options = CurrentOptions ();
2438+ options.file_checksum_gen_factory =
2439+ ROCKSDB_NAMESPACE::GetFileChecksumGenCrc32cFactory ();
24262440 DestroyAndReopen (options);
24272441 TableFileListener* listener = new TableFileListener ();
24282442 options.listeners .emplace_back (listener);
@@ -3311,17 +3325,17 @@ TEST_F(DBBasicTest, VerifyFileChecksums) {
33113325 DestroyAndReopen (options);
33123326 ASSERT_OK (Put (" a" , " value" ));
33133327 ASSERT_OK (Flush ());
3314- ASSERT_TRUE (db_ ->VerifyFileChecksums (ReadOptions ()).IsInvalidArgument ());
3328+ ASSERT_TRUE (dbfull () ->VerifyFileChecksums (ReadOptions ()).IsInvalidArgument ());
33153329
33163330 options.file_checksum_gen_factory = GetFileChecksumGenCrc32cFactory ();
33173331 Reopen (options);
3318- ASSERT_OK (db_ ->VerifyFileChecksums (ReadOptions ()));
3332+ ASSERT_OK (dbfull () ->VerifyFileChecksums (ReadOptions ()));
33193333
33203334 // Write an L0 with checksum computed.
33213335 ASSERT_OK (Put (" b" , " value" ));
33223336 ASSERT_OK (Flush ());
33233337
3324- ASSERT_OK (db_ ->VerifyFileChecksums (ReadOptions ()));
3338+ ASSERT_OK (dbfull () ->VerifyFileChecksums (ReadOptions ()));
33253339}
33263340#endif // !ROCKSDB_LITE
33273341
0 commit comments