Skip MemoryAllocatorTest in LITE mode (#9318)

Summary:
The tests rely on `CreateFromString()`, which returns
`Status::NotSupported()` when these tests attempt to create non-default
allocators.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9318

Reviewed By: riversand963

Differential Revision: D33238405

Pulled By: ajkr

fbshipit-source-id: d2974e2341f1494f5f7cd07b73f2dbd0d502fc7c
This commit is contained in:
Andrew Kryczka 2021-12-20 10:27:35 -08:00 committed by Facebook GitHub Bot
parent 863c78d2c9
commit 48b53441fd
1 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,11 @@
#include "utilities/memory_allocators.h" #include "utilities/memory_allocators.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
// TODO: the tests do not work in LITE mode due to relying on
// `CreateFromString()` to create non-default memory allocators.
#ifndef ROCKSDB_LITE
class MemoryAllocatorTest class MemoryAllocatorTest
: public testing::Test, : public testing::Test,
public ::testing::WithParamInterface<std::tuple<std::string, bool>> { public ::testing::WithParamInterface<std::tuple<std::string, bool>> {
@ -228,6 +233,8 @@ INSTANTIATE_TEST_CASE_P(
JemallocNodumpAllocator::IsSupported()))); JemallocNodumpAllocator::IsSupported())));
#endif // ROCKSDB_JEMALLOC #endif // ROCKSDB_JEMALLOC
#endif // ROCKSDB_LITE
} // namespace ROCKSDB_NAMESPACE } // namespace ROCKSDB_NAMESPACE
int main(int argc, char** argv) { int main(int argc, char** argv) {