Skip to content

Commit

Permalink
Merge pull request ceph#56591 from tchaikov/wip-unittest_rocksdb_opti…
Browse files Browse the repository at this point in the history
…on-fix-leak

tests: unittest_rocksdb_option: do not leak RocksDBStore

Reviewed-by: Igor Fedotov <igor.fedotov@croit.io>
  • Loading branch information
tchaikov authored Mar 31, 2024
2 parents d37aa58 + fd5b00d commit d6c8171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/objectstore/TestRocksdbOptionParse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TEST(RocksDBOption, simple) {
rocksdb::Options options;
rocksdb::Status status;
map<string,string> kvoptions;
RocksDBStore *db = new RocksDBStore(g_ceph_context, dir, kvoptions, NULL);
auto db = std::make_unique<RocksDBStore>(g_ceph_context, dir, kvoptions, nullptr);
string options_string = ""
"write_buffer_size=536870912;"
"create_if_missing=true;"
Expand Down Expand Up @@ -48,7 +48,7 @@ TEST(RocksDBOption, interpret) {
rocksdb::Options options;
rocksdb::Status status;
map<string,string> kvoptions;
RocksDBStore *db = new RocksDBStore(g_ceph_context, dir, kvoptions, NULL);
auto db = std::make_unique<RocksDBStore>(g_ceph_context, dir, kvoptions, nullptr);
string options_string = "compact_on_mount = true; compaction_threads=10;flusher_threads=5;";

int r = db->ParseOptionsFromString(options_string, options);
Expand Down

0 comments on commit d6c8171

Please sign in to comment.