diff options
Diffstat (limited to 'src/mongo/dbtests/storage_timestamp_tests.cpp')
-rw-r--r-- | src/mongo/dbtests/storage_timestamp_tests.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/mongo/dbtests/storage_timestamp_tests.cpp b/src/mongo/dbtests/storage_timestamp_tests.cpp index d856592ff64..a3b701d51e9 100644 --- a/src/mongo/dbtests/storage_timestamp_tests.cpp +++ b/src/mongo/dbtests/storage_timestamp_tests.cpp @@ -2298,9 +2298,8 @@ public: // Create a background index via `applyOps`. We will timestamp the beginning at // `startBuildTs` and the end, due to manipulation of the logical clock, should be // timestamped at `endBuildTs`. - const auto beforeBuildTime = _clock->reserveTicks(3); + const auto beforeBuildTime = _clock->reserveTicks(2); const auto startBuildTs = beforeBuildTime.addTicks(1).asTimestamp(); - const auto endBuildTs = beforeBuildTime.addTicks(3).asTimestamp(); // Grab the existing idents to identify the ident created by the index build. auto kvStorageEngine = @@ -2339,22 +2338,10 @@ public: assertIdentsMissingAtTimestamp( kvCatalog, "", indexIdent, beforeBuildTime.asTimestamp()); assertIdentsExistAtTimestamp(kvCatalog, "", indexIdent, startBuildTs); - if (Foreground) { - // In the Foreground case, the index build should start and finish at - // `startBuildTs`. - ASSERT_TRUE( - getIndexMetaData(getMetaDataAtTime(kvCatalog, nss, startBuildTs), "field_1") - .ready); - } else { - // In the Background case, the index build should not be "ready" at `startBuildTs`. - ASSERT_FALSE( - getIndexMetaData(getMetaDataAtTime(kvCatalog, nss, startBuildTs), "field_1") - .ready); - assertIdentsExistAtTimestamp(kvCatalog, "", indexIdent, endBuildTs); - ASSERT_TRUE( - getIndexMetaData(getMetaDataAtTime(kvCatalog, nss, endBuildTs), "field_1") - .ready); - } + + // In all cases, the index build should start and finish at `startBuildTs`. + ASSERT_TRUE( + getIndexMetaData(getMetaDataAtTime(kvCatalog, nss, startBuildTs), "field_1").ready); } } }; |