diff --git a/db/fault_injection_test.cc b/db/fault_injection_test.cc index 0883de77b..d4d4932aa 100644 --- a/db/fault_injection_test.cc +++ b/db/fault_injection_test.cc @@ -405,6 +405,7 @@ TEST_P(FaultInjectionTest, WriteOptionSyncTest) { env_->SetFilesystemActive(false); NoWriteTestReopenWithFault(kResetDropAndDeleteUnsynced); sleeping_task_low.WakeUp(); + sleeping_task_low.WaitUntilDone(); ASSERT_OK(OpenDB()); std::string val; @@ -489,6 +490,7 @@ TEST_P(FaultInjectionTest, ManualLogSyncTest) { env_->SetFilesystemActive(false); NoWriteTestReopenWithFault(kResetDropAndDeleteUnsynced); sleeping_task_low.WakeUp(); + sleeping_task_low.WaitUntilDone(); ASSERT_OK(OpenDB()); std::string val;