Skip to content

Commit c1f83cd

Browse files
committed
Delete iterator in replication_test
1 parent 68c758a commit c1f83cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cloud/replication_test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,13 +1315,15 @@ TEST_F(ReplicationTest, SuperSnapshot) {
13151315
ASSERT_OK(follower->Get(ro, "k1", &val));
13161316
EXPECT_EQ(val, "v1");
13171317

1318-
auto iter = follower->NewIterator(ro, follower->DefaultColumnFamily());
1318+
auto iter = std::unique_ptr<rocksdb::Iterator>(
1319+
follower->NewIterator(ro, follower->DefaultColumnFamily()));
13191320
iter->SeekToFirst();
13201321
EXPECT_TRUE(iter->Valid());
13211322
EXPECT_EQ(iter->key(), "k1");
13221323
EXPECT_EQ(iter->value(), "v1");
13231324
iter->Next();
13241325
EXPECT_FALSE(iter->Valid());
1326+
iter.reset();
13251327

13261328
ro.snapshot = nullptr;
13271329
ASSERT_OK(follower->Get(ro, followerCF("cf1"), "cf1k1", &val));

0 commit comments

Comments
 (0)