diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2020-02-21 14:23:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-22 03:59:16 +0000 |
commit | 36cdf610b30d1a96fc0d54f5694c4034c84d140b (patch) | |
tree | 0101262893c0bf941b05c302ae82c13fe06c10dc | |
parent | b03fb82e1737b28fbd322e9bf200bb7a3176d9f7 (diff) | |
download | mongo-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.js | 3 |
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()); |