Fix DBTest.DynamicMiscOptions so it passes even with Snappy disabled (#5438)

Summary:
This affects our "no compression" automated tests. Since PR #5368, DBTest.DynamicMiscOptions has been failing with:

db/db_test.cc:4889: Failure
dbfull()->SetOptions({{"compression", "kSnappyCompression"}})
Invalid argument: Compression type Snappy is not linked with the binary.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5438

Differential Revision: D15752100

Pulled By: ltamasi

fbshipit-source-id: 3f19eff7cafc03b333965be0203c5853d2a9cb71
main
Levi Tamasi 5 years ago committed by Facebook Github Bot
parent c8c1a549f0
commit a94aef6596
  1. 17
      db/db_test.cc

@ -4884,14 +4884,15 @@ TEST_F(DBTest, DynamicMiscOptions) {
ASSERT_OK(dbfull()->TEST_GetLatestMutableCFOptions(handles_[0], ASSERT_OK(dbfull()->TEST_GetLatestMutableCFOptions(handles_[0],
&mutable_cf_options)); &mutable_cf_options));
ASSERT_EQ(CompressionType::kNoCompression, mutable_cf_options.compression); ASSERT_EQ(CompressionType::kNoCompression, mutable_cf_options.compression);
// Appveyor fails with: Compression type Snappy is not linked with the binary
#ifndef OS_WIN if (Snappy_Supported()) {
ASSERT_OK(dbfull()->SetOptions({{"compression", "kSnappyCompression"}})); ASSERT_OK(dbfull()->SetOptions({{"compression", "kSnappyCompression"}}));
ASSERT_OK(dbfull()->TEST_GetLatestMutableCFOptions(handles_[0], ASSERT_OK(dbfull()->TEST_GetLatestMutableCFOptions(handles_[0],
&mutable_cf_options)); &mutable_cf_options));
ASSERT_EQ(CompressionType::kSnappyCompression, ASSERT_EQ(CompressionType::kSnappyCompression,
mutable_cf_options.compression); mutable_cf_options.compression);
#endif }
// Test paranoid_file_checks already done in db_block_cache_test // Test paranoid_file_checks already done in db_block_cache_test
ASSERT_OK( ASSERT_OK(
dbfull()->SetOptions(handles_[1], {{"paranoid_file_checks", "true"}})); dbfull()->SetOptions(handles_[1], {{"paranoid_file_checks", "true"}}));

Loading…
Cancel
Save