summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2013-07-23 17:32:02 -0400
committerScott Hernandez <scotthernandez@gmail.com>2013-07-23 17:32:12 -0400
commita36c34b7f6fc2120e0cdf1e43609fe7cef2eb82c (patch)
tree801d020a30aaf85ff292d661ed702755af03fc1c
parent37f7f30a5abc3f16bbc2001bb44eb6c65d360bef (diff)
downloadmongo-a36c34b7f6fc2120e0cdf1e43609fe7cef2eb82c.tar.gz
SERVER-8748: make test more robust
-rw-r--r--jstests/replsets/stepdown_wrt_electable.js9
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();