summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2022-05-11 06:43:43 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-12 00:02:40 +0000
commit3ea669ee446b6dd6335050f6194e40477d174911 (patch)
treea9102c3724fddc5dc159e7fe294663ebc609d995
parent27c96773225b595d1d58691ece2e70fea389fd43 (diff)
downloadmongo-3ea669ee446b6dd6335050f6194e40477d174911.tar.gz
SERVER-66319 dbcheck_no_history_on_secondary.js waits for dbCheck hasher to start
(cherry picked from commit 3ba08e75e54c9e5f80e12870f0a42949ee449239)
-rw-r--r--jstests/noPassthrough/dbcheck_no_history_on_secondary.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/noPassthrough/dbcheck_no_history_on_secondary.js b/jstests/noPassthrough/dbcheck_no_history_on_secondary.js
index 1c94ab416eb..a60992e0b08 100644
--- a/jstests/noPassthrough/dbcheck_no_history_on_secondary.js
+++ b/jstests/noPassthrough/dbcheck_no_history_on_secondary.js
@@ -43,6 +43,9 @@ const fp = configureFailPoint(primary, 'SleepDbCheckInBatch', {sleepMs: sleepMs}
// Returns immediately and starts a background task.
assert.commandWorked(testDB.getSiblingDB('test').runCommand({dbCheck: 1}));
+// Wait for dbCheck hasher to acquire snapshot.
+fp.wait();
+
// Write some data to advance the durable timestamp while we're waiting for dbCheck to run.
docs = [];
for (let i = 0; i < 100; i++) {