From 3ea669ee446b6dd6335050f6194e40477d174911 Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Wed, 11 May 2022 06:43:43 -0400 Subject: SERVER-66319 dbcheck_no_history_on_secondary.js waits for dbCheck hasher to start (cherry picked from commit 3ba08e75e54c9e5f80e12870f0a42949ee449239) --- jstests/noPassthrough/dbcheck_no_history_on_secondary.js | 3 +++ 1 file changed, 3 insertions(+) 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++) { -- cgit v1.2.1