Skip to content

Commit 5ffb37a

Browse files
BenHuddlestondaverigby
authored andcommitted
MB-45408: Enabled some PiTR test variants
This requires that we don't assert that the dropped collections list is empty after we compact if we have PiTR enabled. Change-Id: I6377ae0e0f74be73d111e58bdc381d010a5d7960 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/171937 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent e54259a commit 5ffb37a

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

engines/ep/tests/module_tests/collections/evp_store_collections_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4558,6 +4558,11 @@ INSTANTIATE_TEST_SUITE_P(CollectionsEphemeralOrPersistent,
45584558
STParameterizedBucketTest::allConfigValues(),
45594559
STParameterizedBucketTest::PrintToStringParamName);
45604560

4561+
INSTANTIATE_TEST_SUITE_P(CollectionsEphemeralOrPersistentPitrEnabled,
4562+
CollectionsParameterizedTest,
4563+
STParameterizedBucketTest::pitrEnabledConfigValues(),
4564+
STParameterizedBucketTest::PrintToStringParamName);
4565+
45614566
INSTANTIATE_TEST_SUITE_P(CollectionsEphemeralOnlyTests,
45624567
CollectionsEphemeralParameterizedTest,
45634568
STParameterizedBucketTest::ephConfigValues(),

engines/ep/tests/module_tests/evp_store_durability_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5071,6 +5071,11 @@ INSTANTIATE_TEST_SUITE_P(AllBackends,
50715071
STParameterizedBucketTest::allConfigValues(),
50725072
STParameterizedBucketTest::PrintToStringParamName);
50735073

5074+
INSTANTIATE_TEST_SUITE_P(AllBackendsPitrEnabled,
5075+
DurabilityBucketTest,
5076+
STParameterizedBucketTest::pitrEnabledConfigValues(),
5077+
STParameterizedBucketTest::PrintToStringParamName);
5078+
50745079
// maxVisibleSeqno tests run against all persistent storage backends.
50755080
INSTANTIATE_TEST_SUITE_P(AllBackends,
50765081
BackingStoreMaxVisibleSeqnoTest,

engines/ep/tests/module_tests/evp_store_single_threaded_test.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,16 @@ void SingleThreadedKVBucketTest::scheduleAndRunCollectionsEraser(
469469
->getRWUnderlying()
470470
->getDroppedCollections(id);
471471
ASSERT_TRUE(status);
472-
EXPECT_TRUE(dropped.empty());
472+
if (!isPitrEnabled()) {
473+
// We are trying to check if the dropped collections are
474+
// still present on disk. The document is typically deleted
475+
// during compaction but with PiTR we have some extra
476+
// criteria to hit that we don't in this test (the compacting
477+
// headers must be older than the max history age). As such,
478+
// the dropped collections (and the data that belongs to them)
479+
// are still present on disk for PiTR tests.
480+
EXPECT_TRUE(dropped.empty());
481+
}
473482
}
474483
} else {
475484
auto* bucket = dynamic_cast<EphemeralBucket*>(store);

0 commit comments

Comments
 (0)