summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/list_indexes_with_build_uuids.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-10-22 08:13:52 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-22 17:13:30 +0000
commit6108ecd5a88eec78050934bbef55059faea92477 (patch)
tree8cb85c09630f35c52f2e499c6777a7bcd0ea1383 /jstests/noPassthrough/list_indexes_with_build_uuids.js
parentaa9170343b895c2a0cfa9a897c6b0a432a6330d5 (diff)
downloadmongo-6108ecd5a88eec78050934bbef55059faea92477.tar.gz
SERVER-51773 list_indexes_with_build_uuids.js waits for replication before calling listIndexes
Diffstat (limited to 'jstests/noPassthrough/list_indexes_with_build_uuids.js')
-rw-r--r--jstests/noPassthrough/list_indexes_with_build_uuids.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/noPassthrough/list_indexes_with_build_uuids.js b/jstests/noPassthrough/list_indexes_with_build_uuids.js
index 7856bf8db31..fd9dfb3102e 100644
--- a/jstests/noPassthrough/list_indexes_with_build_uuids.js
+++ b/jstests/noPassthrough/list_indexes_with_build_uuids.js
@@ -74,6 +74,9 @@ const createIdx =
const opId = IndexBuildTest.waitForIndexBuildToStart(secondaryDB);
jsTestLog('Index builds started on secondary. Op ID of one of the builds: ' + opId);
+// Wait for replication to allow listIndexes to read the latest state on the secondary.
+replSet.awaitReplication();
+
// Check the listIndexes() output.
let res = secondaryDB.runCommand({listIndexes: collName, includeBuildUUIDs: true});