From c6654588bda62fcd66be2edfe83cba37464a8267 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 25 Jul 2016 11:48:17 -0700 Subject: [PATCH] Disable two dynamic options tests under lite build Summary: RocksDB lite don't support dynamic options. Disable the two test from lite build, and assert `SetOptions` should return `status::OK`. Test Plan: Run the db_options test under lite build and normal build. Reviewers: sdong Reviewed By: sdong Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D61119 --- db/db_options_test.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/db/db_options_test.cc b/db/db_options_test.cc index 569a085cc..9df6b4e67 100644 --- a/db/db_options_test.cc +++ b/db/db_options_test.cc @@ -17,6 +17,9 @@ class DBOptionsTest : public DBTestBase { DBOptionsTest() : DBTestBase("/db_options_test") {} }; +// RocksDB lite don't support dynamic options. +#ifndef ROCKSDB_LITE + // When write stalls, user can enable auto compaction to unblock writes. // However, we had an issue where the stalled write thread blocks the attempt // to persist auto compaction option, thus creating a deadlock. The test @@ -52,7 +55,7 @@ TEST_F(DBOptionsTest, EnableAutoCompactionToUnblockWrites) { ASSERT_TRUE(dbfull()->TEST_write_controler().IsStopped()); ColumnFamilyHandle* handle = dbfull()->DefaultColumnFamily(); // We will get a deadlock here if we hit the issue. - dbfull()->EnableAutoCompaction({handle}); + ASSERT_OK(dbfull()->EnableAutoCompaction({handle})); env_->WaitForJoin(); } @@ -87,11 +90,14 @@ TEST_F(DBOptionsTest, ToggleStopTriggerToUnblockWrites) { TEST_SYNC_POINT("DBOptionsTest::ToggleStopTriggerToUnblockWrites:1"); ASSERT_TRUE(dbfull()->TEST_write_controler().IsStopped()); // We will get a deadlock here if we hit the issue. - dbfull()->SetOptions({{"level0_stop_writes_trigger", "1000000"}, - {"level0_slowdown_writes_trigger", "1000000"}}); + ASSERT_OK( + dbfull()->SetOptions({{"level0_stop_writes_trigger", "1000000"}, + {"level0_slowdown_writes_trigger", "1000000"}})); env_->WaitForJoin(); } +#endif // ROCKSDB_LITE + } // namespace rocksdb int main(int argc, char** argv) {