Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykorean committed Mar 12, 2024
1 parent bdbead0 commit af948c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions db/multi_cf_iterator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,21 @@ TEST_F(MultiCfIteratorTest, EmptyCfs) {
ASSERT_OK(iter->status());
}
{
// Case 2: keys in only one of the CF. Rest CFs are empty.
// Case 2: A single key exists in only one of the CF. Rest CFs are empty.
ASSERT_OK(Put(1, "key_1", "key_1_cf_1_val"));
std::unique_ptr<Iterator> iter =
db_->NewMultiCfIterator(ReadOptions(), handles_);
iter->SeekToFirst();
ASSERT_EQ(IterStatus(iter.get()), "key_1->key_1_cf_1_val");
iter->Next();
ASSERT_EQ(IterStatus(iter.get()), "(invalid)");
iter->SeekToFirst();
iter->SeekToLast();
ASSERT_EQ(IterStatus(iter.get()), "key_1->key_1_cf_1_val");
iter->Prev();
ASSERT_EQ(IterStatus(iter.get()), "(invalid)");
}
{
// Case 3: same keys in all of the CFs except one (cf_2).
// Case 3: same key exists in all of the CFs except one (cf_2)
ASSERT_OK(Put(0, "key_1", "key_1_cf_0_val"));
ASSERT_OK(Put(3, "key_1", "key_1_cf_3_val"));
// handles_ are in the order of 0->1->2->3. We should expect value from cf_0
Expand All @@ -258,7 +258,7 @@ TEST_F(MultiCfIteratorTest, EmptyCfs) {
ASSERT_EQ(IterStatus(iter.get()), "key_1->key_1_cf_0_val");
iter->Next();
ASSERT_EQ(IterStatus(iter.get()), "(invalid)");
iter->SeekToFirst();
iter->SeekToLast();
ASSERT_EQ(IterStatus(iter.get()), "key_1->key_1_cf_0_val");
iter->Prev();
ASSERT_EQ(IterStatus(iter.get()), "(invalid)");
Expand Down

0 comments on commit af948c5

Please sign in to comment.