Skip to content

Commit

Permalink
Add test for option override issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lucagiac81 committed Jan 11, 2024
1 parent 4200bba commit 45a3eca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions util/compression_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,21 @@ TEST(Compression, ColumnFamilyOptionsFromStringWithPluginCompressor) {
ASSERT_EQ(new_options.compressor->GetCompressionType(), kPluginCompression);
}

TEST(Compression, ColumnFamilyOptionsFromStringWithCompression) {
ConfigOptions config_options;
auto library = config_options.registry->AddLibrary(
"ColumnFamilyOptionsFromStringWithCompression");
ColumnFamilyOptions options, new_options;
config_options.ignore_unsupported_options = false;

Status s = GetColumnFamilyOptionsFromString(
config_options, options, "compression=kZlibCompression", &new_options);
ASSERT_OK(s);
ASSERT_EQ(new_options.compression, kZlibCompression);
ASSERT_NE(new_options.compressor, nullptr);
ASSERT_STREQ(new_options.compressor->Name(), ZlibCompressor::kClassName());
}

TEST(Compression, StringFromColumnFamilyOptions) {
ConfigOptions config_options;
auto library =
Expand Down

0 comments on commit 45a3eca

Please sign in to comment.