diff --git a/db/compact_files_test.cc b/db/compact_files_test.cc index b93a88611..1d7cf78a0 100644 --- a/db/compact_files_test.cc +++ b/db/compact_files_test.cc @@ -309,6 +309,14 @@ TEST_F(CompactFilesTest, CompactionFilterWithGetSv) { } TEST_F(CompactFilesTest, SentinelCompressionType) { + if (!Zlib_Supported()) { + fprintf(stderr, "zlib compression not supported, skip this test\n"); + return; + } + if (!Snappy_Supported()) { + fprintf(stderr, "snappy compression not supported, skip this test\n"); + return; + } // Check that passing `CompressionType::kDisableCompressionOption` to // `CompactFiles` causes it to use the column family compression options. for (auto compaction_style :