diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2013-07-23 17:32:02 -0400 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2013-07-23 17:32:12 -0400 |
commit | a36c34b7f6fc2120e0cdf1e43609fe7cef2eb82c (patch) | |
tree | 801d020a30aaf85ff292d661ed702755af03fc1c | |
parent | 37f7f30a5abc3f16bbc2001bb44eb6c65d360bef (diff) | |
download | mongo-a36c34b7f6fc2120e0cdf1e43609fe7cef2eb82c.tar.gz |
SERVER-8748: make test more robust
-rw-r--r-- | jstests/replsets/stepdown_wrt_electable.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/jstests/replsets/stepdown_wrt_electable.js b/jstests/replsets/stepdown_wrt_electable.js index e47b6ab09c6..3d21a74f67c 100644 --- a/jstests/replsets/stepdown_wrt_electable.js +++ b/jstests/replsets/stepdown_wrt_electable.js @@ -29,9 +29,10 @@ var waitfunc = startParallelShell(command); sleep(100) // startParallelShell doesn't block // check that the old primary is no longer master -var isMaster = new Mongo(firstPrimary).getDB("a").isMaster(); -printjson(isMaster); -assert(!(isMaster.ismaster), "is master") - +assert.soon( function() { + var isMaster = new Mongo(firstPrimary).getDB("a").isMaster(); + printjson(isMaster); + return !(isMaster.ismaster); + }, "they shouldn't be master, but are") // stop replTest.stopSet(); |