diff options
author | Kristina <kristina@10gen.com> | 2012-10-12 13:54:33 -0400 |
---|---|---|
committer | Kristina <kristina@10gen.com> | 2012-10-12 13:55:13 -0400 |
commit | fd5cef9ff6475b67aadf95d25dec45875a670752 (patch) | |
tree | 8d13658a7ecdccd418e7521fcb3f8b7fd5f5f84f /jstests/replsets/stepdown.js | |
parent | dbaff09e6fa0be4db855125e8f1863a725ef7801 (diff) | |
download | mongo-fd5cef9ff6475b67aadf95d25dec45875a670752.tar.gz |
SERVER-1929 Fix test race condition
Diffstat (limited to 'jstests/replsets/stepdown.js')
-rw-r--r-- | jstests/replsets/stepdown.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/replsets/stepdown.js b/jstests/replsets/stepdown.js index a28990780d7..4e19daa59aa 100644 --- a/jstests/replsets/stepdown.js +++ b/jstests/replsets/stepdown.js @@ -75,6 +75,8 @@ catch (e) { print("\nawait"); replTest.awaitReplication(); +// 31000 may have just voted for 31001, preventing it from becoming primary for the first 30 seconds +// of this assert.soon assert.soon(function() { try { var result = master.getDB("admin").runCommand({isMaster: 1}); @@ -82,7 +84,7 @@ assert.soon(function() { } catch (x) { return false; } -}); +}, 'wait for 31000 to be primary', 60000); master = replTest.getMaster(); var firstMaster = master; |