diff options
author | Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> | 2022-11-23 13:35:09 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-23 14:03:58 +0000 |
commit | e52ef833562b03874448cdcbddae9d585b2dc0b0 (patch) | |
tree | 201920d32a53b6f6570017070a0dc31e29af0d44 /src/mongo/db/s/collection_sharding_runtime_test.cpp | |
parent | dbf58f2acbb9872ec22815fe6ae72dcdd0eda204 (diff) | |
download | mongo-e52ef833562b03874448cdcbddae9d585b2dc0b0.tar.gz |
SERVER-71122 Get rid of the `WaitForCleanCorrectEvenAfterClearFollowedBySetFilteringMetadata` unit test
Diffstat (limited to 'src/mongo/db/s/collection_sharding_runtime_test.cpp')
-rw-r--r-- | src/mongo/db/s/collection_sharding_runtime_test.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mongo/db/s/collection_sharding_runtime_test.cpp b/src/mongo/db/s/collection_sharding_runtime_test.cpp index 7e6be38d544..716527cf6d9 100644 --- a/src/mongo/db/s/collection_sharding_runtime_test.cpp +++ b/src/mongo/db/s/collection_sharding_runtime_test.cpp @@ -556,44 +556,6 @@ TEST_F(CollectionShardingRuntimeWithRangeDeleterTest, ASSERT(cleanupComplete.isReady()); } -TEST_F(CollectionShardingRuntimeWithRangeDeleterTest, - WaitForCleanCorrectEvenAfterClearFollowedBySetFilteringMetadata) { - globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::alwaysOn); - ScopeGuard resetFailPoint( - [=] { globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::off); }); - - OperationContext* opCtx = operationContext(); - auto metadata = makeShardedMetadata(opCtx, uuid()); - csr()->setFilteringMetadata(opCtx, metadata); - const ChunkRange range = ChunkRange(BSON(kShardKey << MINKEY), BSON(kShardKey << MAXKEY)); - const auto task = createRangeDeletionTask(opCtx, kTestNss, uuid(), range, 0); - - // Schedule range deletion that will hang due to `suspendRangeDeletion` failpoint - auto cleanupComplete = registerAndCreatePersistentTask( - opCtx, task, SemiFuture<void>::makeReady() /* waitForActiveQueries */); - - // Clear and set again filtering metadata - csr()->clearFilteringMetadata(opCtx); - csr()->setFilteringMetadata(opCtx, metadata); - - auto waitForCleanUp = [&](Date_t timeout) { - return CollectionShardingRuntime::waitForClean(opCtx, kTestNss, uuid(), range, timeout); - }; - - // Check that the hanging range deletion is still tracked even following a clear of the metadata - auto status = waitForCleanUp(Date_t::now() + Milliseconds(100)); - ASSERT_NOT_OK(status); - ASSERT(!cleanupComplete.isReady()); - - globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::off); - resetFailPoint.dismiss(); - - // Check that the range deletion is not tracked anymore after it succeeds - status = waitForCleanUp(Date_t::max()); - ASSERT_OK(status); - ASSERT(cleanupComplete.isReady()); -} - class CollectionShardingRuntimeWithCatalogTest : public CollectionShardingRuntimeWithRangeDeleterTest { public: |