diff --git a/db/error_handler_fs_test.cc b/db/error_handler_fs_test.cc index cf1d7189a..6d625fffe 100644 --- a/db/error_handler_fs_test.cc +++ b/db/error_handler_fs_test.cc @@ -1212,7 +1212,7 @@ TEST_F(DBErrorHandlingFSTest, MultiDBVariousErrors) { delete def_env; } -TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover1) { +TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover1) { // Fail the first resume and make the second resume successful std::shared_ptr fault_fs( new FaultInjectionTestFS(FileSystem::Default())); @@ -1287,25 +1287,16 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover2) { error_msg.SetRetryable(true); Put(Key(1), "val1"); - ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->LoadDependency( - {{"RecoverFromRetryableBGIOError:BeforeStart", - "FLushWritRetryableeErrorAutoRecover2:0"}, - {"FLushWritRetryableeErrorAutoRecover2:1", - "RecoverFromRetryableBGIOError:BeforeStart1"}, - {"RecoverFromRetryableBGIOError:RecoverSuccess", - "FLushWritRetryableeErrorAutoRecover2:2"}}); SyncPoint::GetInstance()->SetCallBack( "BuildTable:BeforeFinishBuildTable", [&](void*) { fault_fs->SetFilesystemActive(false, error_msg); }); + SyncPoint::GetInstance()->EnableProcessing(); s = Flush(); ASSERT_EQ(s.severity(), ROCKSDB_NAMESPACE::Status::Severity::kHardError); - TEST_SYNC_POINT("FLushWritRetryableeErrorAutoRecover2:0"); - fault_fs->SetFilesystemActive(true); - ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->ClearAllCallBacks(); - TEST_SYNC_POINT("FLushWritRetryableeErrorAutoRecover2:1"); - TEST_SYNC_POINT("FLushWritRetryableeErrorAutoRecover2:2"); SyncPoint::GetInstance()->DisableProcessing(); + fault_fs->SetFilesystemActive(true); + ASSERT_EQ(listener->WaitForRecovery(5000000), true); ASSERT_EQ("val1", Get(Key(1))); Reopen(options); @@ -1371,7 +1362,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover3) { Destroy(options); } -TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover4) { +TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover4) { // Fail the first resume and does not do resume second time because // the IO error severity is Fatal Error and not Retryable. std::shared_ptr fault_fs( @@ -1437,7 +1428,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover4) { Destroy(options); } -TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover5) { +TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover5) { // During the resume, call DB->CLose, make sure the resume thread exist // before close continues. Due to the shutdown, the resume is not successful // and the FS does not become active, so close status is still IO error