summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2012-06-21 11:19:07 -0400
committerKristina <kristina@10gen.com>2012-06-21 11:19:07 -0400
commit81d743f8f44c74d23b54c440e1f9f822c36f1f34 (patch)
tree2236e9d6ec33e4e6bcdaaf23cda2f19721749980
parenta4c94408c52f9c484b4f52f447701aa3240f8624 (diff)
downloadmongo-81d743f8f44c74d23b54c440e1f9f822c36f1f34.tar.gz
Fix test: wait for member to become secondary before querying
-rw-r--r--jstests/replsets/slavedelay1.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/replsets/slavedelay1.js b/jstests/replsets/slavedelay1.js
index 694279cd86e..4b1a3710dac 100644
--- a/jstests/replsets/slavedelay1.js
+++ b/jstests/replsets/slavedelay1.js
@@ -120,6 +120,10 @@ doTest = function( signal ) {
return conn.getDB("local").system.replset.findOne().version == config.version;
});
+ assert.soon(function() {
+ return conn.getDB("admin").isMaster().secondary;
+ });
+
master.foo.insert({_id : 124, "x" : "foo"});
assert(master.foo.findOne({_id:124}) != null);