summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2020-02-21 14:23:46 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-22 03:59:16 +0000
commit36cdf610b30d1a96fc0d54f5694c4034c84d140b (patch)
tree0101262893c0bf941b05c302ae82c13fe06c10dc
parentb03fb82e1737b28fbd322e9bf200bb7a3176d9f7 (diff)
downloadmongo-36cdf610b30d1a96fc0d54f5694c4034c84d140b.tar.gz
SERVER-46305 Fix index_initial_sync.js to wait for node to become secondary before checking indexes
-rw-r--r--jstests/noPassthrough/libs/index_initial_sync.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/noPassthrough/libs/index_initial_sync.js b/jstests/noPassthrough/libs/index_initial_sync.js
index 9ec16580798..ecd2322d6d9 100644
--- a/jstests/noPassthrough/libs/index_initial_sync.js
+++ b/jstests/noPassthrough/libs/index_initial_sync.js
@@ -45,8 +45,9 @@ var IndexInitialSyncTest = function(options) {
startClean: true,
});
- // Wait for the secondary to complete initial sync.
+ // Wait for the secondary to complete initial sync and transition to SECONDARY state.
rst.awaitReplication();
+ rst.awaitSecondaryNodes();
// Ensure that the index on the secondary is in an unfinished state.
const secondaryDB = secondary.getDB(testDB.getName());