Fix no compression test

Summary:
DBBlockCacheTest.TestWithCompressedBlockCache is depending on compression using snappy, so this test fail when snappy is not available
block this test when we don't have snappy

https://ci-builds.fb.com/view/rocksdb/job/rocksdb_no_compression/833/console

Test Plan: run the test when compression libraries are not avaliable

Reviewers: sdong, yiwu

Reviewed By: yiwu

Subscribers: andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D55413
main
Islam AbdelRahman 9 years ago
parent b9cc42a72c
commit 3ff98bd209
  1. 3
      db/db_block_cache_test.cc

@ -166,10 +166,12 @@ TEST_F(DBBlockCacheTest, TestWithoutCompressedBlockCache) {
} }
} }
#ifdef SNAPPY
TEST_F(DBBlockCacheTest, TestWithCompressedBlockCache) { TEST_F(DBBlockCacheTest, TestWithCompressedBlockCache) {
ReadOptions read_options; ReadOptions read_options;
auto table_options = GetTableOptions(); auto table_options = GetTableOptions();
auto options = GetOptions(table_options); auto options = GetOptions(table_options);
options.compression = CompressionType::kSnappyCompression;
InitTable(options); InitTable(options);
std::shared_ptr<Cache> cache = NewLRUCache(0, 0, false); std::shared_ptr<Cache> cache = NewLRUCache(0, 0, false);
@ -227,6 +229,7 @@ TEST_F(DBBlockCacheTest, TestWithCompressedBlockCache) {
delete iter; delete iter;
iter = nullptr; iter = nullptr;
} }
#endif
} // namespace rocksdb } // namespace rocksdb

Loading…
Cancel
Save