From ddd088c8b91f8f63a110cb3262cc4e4d22fab7ca Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Mon, 17 Jun 2019 21:12:37 -0700 Subject: [PATCH] fix rocksdb lite and clang contrun test failures (#5477) Summary: recent commit 671d15cbdd3839acb54cb21a2aa82efca4917155 introduced some test failures: ``` ===== Running stats_history_test [==========] Running 9 tests from 1 test case. [----------] Global test environment set-up. [----------] 9 tests from StatsHistoryTest [ RUN ] StatsHistoryTest.RunStatsDumpPeriodSec monitoring/stats_history_test.cc:63: Failure dbfull()->SetDBOptions({{"stats_dump_period_sec", "0"}}) Not implemented: Not supported in ROCKSDB LITE db/db_options_test.cc:28:11: error: unused variable 'kMicrosInSec' [-Werror,-Wunused-const-variable] const int kMicrosInSec = 1000000; ``` This PR fixes these failures Pull Request resolved: https://github.com/facebook/rocksdb/pull/5477 Differential Revision: D15871814 Pulled By: miasantreble fbshipit-source-id: 0a7023914d2c1784d9d2d3f5bfb47310d4855394 --- db/db_options_test.cc | 2 -- monitoring/stats_history_test.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_options_test.cc b/db/db_options_test.cc index 7dd672646..fd8d849cd 100644 --- a/db/db_options_test.cc +++ b/db/db_options_test.cc @@ -25,8 +25,6 @@ namespace rocksdb { -const int kMicrosInSec = 1000000; - class DBOptionsTest : public DBTestBase { public: DBOptionsTest() : DBTestBase("/db_options_test") {} diff --git a/monitoring/stats_history_test.cc b/monitoring/stats_history_test.cc index a66043da1..16681fe05 100644 --- a/monitoring/stats_history_test.cc +++ b/monitoring/stats_history_test.cc @@ -30,6 +30,7 @@ class StatsHistoryTest : public DBTestBase { public: StatsHistoryTest() : DBTestBase("/stats_history_test") {} }; +#ifndef ROCKSDB_LITE TEST_F(StatsHistoryTest, RunStatsDumpPeriodSec) { Options options; @@ -566,6 +567,7 @@ TEST_F(StatsHistoryTest, PersistentStatsReadOnly) { // Now check keys in read only mode. ASSERT_OK(ReadOnlyReopen(options)); } +#endif // !ROCKSDB_LITE } // namespace rocksdb