diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2013-08-09 12:42:39 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2013-08-09 12:51:01 -0400 |
commit | 1d539cb19a0b20bfec14706da4dd7d4870364f87 (patch) | |
tree | 08eb118201c2283a0855a035ba6048b54f12dbb5 /jstests/replsets | |
parent | 84ef789d4af1c89986acc737364302e70e973744 (diff) | |
download | mongo-1d539cb19a0b20bfec14706da4dd7d4870364f87.tar.gz |
remove race condition from tags.js and multiVersion/replset_primary_updater[1-6].js
Diffstat (limited to 'jstests/replsets')
-rw-r--r-- | jstests/replsets/tags.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/jstests/replsets/tags.js b/jstests/replsets/tags.js index 589d9a86cd2..a4906506b44 100644 --- a/jstests/replsets/tags.js +++ b/jstests/replsets/tags.js @@ -53,9 +53,15 @@ catch(e) { myprint(e); } -replTest.awaitReplication(); - -myprint("primary should now be 2"); +assert.soon(function() { + try { + return nodes[2].getDB("admin").isMaster().ismaster; + } catch (x) { + return false; + } +}, 'wait for 2 to be primary', 60000); + +myprint("primary is now 2"); master = replTest.getMaster(); config = master.getDB("local").system.replset.findOne(); printjson(config); |