diff options
-rw-r--r-- | jstests/replsets/get_replication_info_helper.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/get_replication_info_helper.js b/jstests/replsets/get_replication_info_helper.js index 570e2c05a08..6cc937a6da8 100644 --- a/jstests/replsets/get_replication_info_helper.js +++ b/jstests/replsets/get_replication_info_helper.js @@ -31,7 +31,9 @@ var mongo = startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", primary.port); mongo(); - assert(rawMongoProgramOutput().match("behind the primary")); + assert.soon(function() { + return rawMongoProgramOutput().match("behind the primary"); + }); // get to a primaryless state for (i in replSet.liveNodes.slaves) { @@ -46,6 +48,8 @@ mongo = startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", primary.port); mongo(); - assert(rawMongoProgramOutput().match("behind the freshest")); + assert.soon(function() { + return rawMongoProgramOutput().match("behind the freshest"); + }); })(); |