summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2013-08-09 12:42:39 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2013-08-09 12:51:01 -0400
commit1d539cb19a0b20bfec14706da4dd7d4870364f87 (patch)
tree08eb118201c2283a0855a035ba6048b54f12dbb5 /jstests/replsets
parent84ef789d4af1c89986acc737364302e70e973744 (diff)
downloadmongo-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.js12
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);