From bf03f59c1180e75bdc7eea03eb50df61f680b7a3 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Thu, 18 Jun 2015 18:46:26 -0700 Subject: [PATCH] Disable CompressLevelCompaction() if Zlib is not supported Summary: CompressLevelCompaction() depends on Zlib. We should skip it when zlib is not present. Test Plan: `make check` without zlib Reviewers: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D40401 --- db/db_test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/db_test.cc b/db/db_test.cc index fc3bb2cf4..b4412ff74 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -13053,6 +13053,9 @@ TEST_F(DBTest, EmptyCompactedDB) { } TEST_F(DBTest, CompressLevelCompaction) { + if (!Zlib_Supported()) { + return; + } Options options = CurrentOptions(); options.compaction_style = kCompactionStyleLevel; options.write_buffer_size = 100 << 10; // 100KB