From 110285073c266cc281f259e1840678d1f35551f9 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Fri, 11 Mar 2022 21:06:55 -0800 Subject: [PATCH] Fix test --- db/db_compaction_test.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/db/db_compaction_test.cc b/db/db_compaction_test.cc index e79259ead..01750a853 100644 --- a/db/db_compaction_test.cc +++ b/db/db_compaction_test.cc @@ -6920,8 +6920,10 @@ TEST_F(DBCompactionTest, DisableMultiManualCompaction) { port::Thread compact_thread1([&]() { CompactRangeOptions cro; cro.exclusive_manual_compaction = false; - Slice b = Key(0); - Slice e = Key(3); + std::string begin_str = Key(0); + std::string end_str = Key(3); + Slice b = begin_str; + Slice e = end_str; auto s = db_->CompactRange(cro, &b, &e); ASSERT_TRUE(s.IsIncomplete()); }); @@ -6929,8 +6931,10 @@ TEST_F(DBCompactionTest, DisableMultiManualCompaction) { port::Thread compact_thread2([&]() { CompactRangeOptions cro; cro.exclusive_manual_compaction = false; - Slice b = Key(4); - Slice e = Key(7); + std::string begin_str = Key(4); + std::string end_str = Key(7); + Slice b = begin_str; + Slice e = end_str; auto s = db_->CompactRange(cro, &b, &e); ASSERT_TRUE(s.IsIncomplete()); });