mirror of https://github.com/facebook/rocksdb.git
Fix tests failing in ROCKSDB_LITE
Summary: Fix tests that compile under ROCKSDB_LITE but currently failing. table_test: RandomizedLongDB test is using internal stats which is not supported in ROCKSDB_LITE compaction_job_test: Using CompactionJobStats which is not supported perf_context_test: KeyComparisonCount test try to open DB in ReadOnly mode which is not supported Test Plan: run the tests under ROCKSDB_LITE Reviewers: yhchiang, sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D48585
This commit is contained in:
parent
7f58ff7c31
commit
1fe78a4073
|
@ -3,6 +3,8 @@
|
|||
// LICENSE file in the root directory of this source tree. An additional grant
|
||||
// of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
#ifndef ROCKSDB_LITE
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -695,3 +697,14 @@ int main(int argc, char** argv) {
|
|||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
#else
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
fprintf(stderr,
|
||||
"SKIPPED as CompactionJobStats is not supported in ROCKSDB_LITE\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // ROCKSDB_LITE
|
||||
|
|
|
@ -444,6 +444,7 @@ void ProfileQueries(bool enabled_time = false) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef ROCKSDB_LITE
|
||||
TEST_F(PerfContextTest, KeyComparisonCount) {
|
||||
SetPerfLevel(kEnableCount);
|
||||
ProfileQueries();
|
||||
|
@ -454,6 +455,7 @@ TEST_F(PerfContextTest, KeyComparisonCount) {
|
|||
SetPerfLevel(kEnableTime);
|
||||
ProfileQueries(true);
|
||||
}
|
||||
#endif // ROCKSDB_LITE
|
||||
|
||||
// make perf_context_test
|
||||
// export ROCKSDB_TESTS=PerfContextTest.SeekKeyComparison
|
||||
|
|
|
@ -1974,6 +1974,7 @@ TEST_F(HarnessTest, Randomized) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef ROCKSDB_LITE
|
||||
TEST_F(HarnessTest, RandomizedLongDB) {
|
||||
Random rnd(test::RandomSeed());
|
||||
TestArgs args = { DB_TEST, false, 16, kNoCompression, 0 };
|
||||
|
@ -1997,6 +1998,7 @@ TEST_F(HarnessTest, RandomizedLongDB) {
|
|||
}
|
||||
ASSERT_GT(files, 0);
|
||||
}
|
||||
#endif // ROCKSDB_LITE
|
||||
|
||||
class MemTableTest : public testing::Test {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue