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
This commit is contained in:
Islam AbdelRahman 2016-03-15 12:17:40 -07:00
parent b9cc42a72c
commit 3ff98bd209

View File

@ -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