Skip to content

Commit

Permalink
Fix test failure in LITE mode (facebook#6050)
Browse files Browse the repository at this point in the history
Summary:
GetSupportedCompressions() is not available in LITE build, so check and use Snappy compression in db_basic_test.cc.
Pull Request resolved: facebook#6050

Test Plan:
make LITE=1 check
make check

Differential Revision: D18588114

Pulled By: anand1976

fbshipit-source-id: a193de58c44f91bcc237107f25dbc1b9458eef3d
  • Loading branch information
anand76 authored and facebook-github-bot committed Nov 19, 2019
1 parent ac498cd commit 38cc611
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions db/db_basic_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,7 @@ class DBBasicTestWithParallelIO
Random rnd(301);
BlockBasedTableOptions table_options;

#ifndef ROCKSDB_LITE
if (compression_enabled_) {
std::vector<CompressionType> compression_types;
compression_types = GetSupportedCompressions();
Expand All @@ -1675,6 +1676,12 @@ class DBBasicTestWithParallelIO
options.compression = compression_types[0];
}
}
#else
// GetSupportedCompressions() is not available in LITE build
if (!Snappy_Supported()) {
compression_enabled_ = false;
}
#endif //ROCKSDB_LITE

table_options.block_cache = uncompressed_cache_;
if (table_options.block_cache == nullptr) {
Expand Down

0 comments on commit 38cc611

Please sign in to comment.