Error handler test fix (#6266)

Summary:
MultiDBCompactionError fails when it verifies the number of files on level 0 and level 1 without waiting for compaction to finish.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6266

Differential Revision: D19701639

Pulled By: riversand963

fbshipit-source-id: e96d511bcde705075f073e0b550cebcd2ecfccdc
main
Huisheng Liu 5 years ago committed by Facebook Github Bot
parent 7242dae7fe
commit eb4d6af5ae
  1. 2
      db/error_handler_test.cc

@ -701,6 +701,8 @@ TEST_F(DBErrorHandlingTest, MultiDBCompactionError) {
for (auto i = 0; i < kNumDbInstances; ++i) { for (auto i = 0; i < kNumDbInstances; ++i) {
std::string prop; std::string prop;
ASSERT_EQ(listener[i]->WaitForRecovery(5000000), true); ASSERT_EQ(listener[i]->WaitForRecovery(5000000), true);
ASSERT_EQ(static_cast<DBImpl*>(db[i])->TEST_WaitForCompact(true),
Status::OK());
EXPECT_TRUE(db[i]->GetProperty( EXPECT_TRUE(db[i]->GetProperty(
"rocksdb.num-files-at-level" + NumberToString(0), &prop)); "rocksdb.num-files-at-level" + NumberToString(0), &prop));
EXPECT_EQ(atoi(prop.c_str()), 0); EXPECT_EQ(atoi(prop.c_str()), 0);

Loading…
Cancel
Save