summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-01-27 10:29:02 -0500
committermatt dannenberg <matt.dannenberg@10gen.com>2015-01-27 10:45:28 -0500
commit8b28519a23a627dc06f335a81c79f972964e2ab7 (patch)
tree9a54aa0bd74d409e8b8e7713b056f0f82a9b7020 /jstests
parentc91e229849d0ccae92a51ebed6b7c2849ba2d03b (diff)
downloadmongo-8b28519a23a627dc06f335a81c79f972964e2ab7.tar.gz
SERVER-17079 for stability, have stepdown_long_wait_time.js waitForState of the secondary rather than the primary
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/stepdown_long_wait_time.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/replsets/stepdown_long_wait_time.js b/jstests/replsets/stepdown_long_wait_time.js
index 6ca307cc8b9..3ec955eab24 100644
--- a/jstests/replsets/stepdown_long_wait_time.js
+++ b/jstests/replsets/stepdown_long_wait_time.js
@@ -26,6 +26,7 @@
replSet.waitForState(replSet.nodes[0], replSet.PRIMARY, 60 * 1000);
var primary = replSet.getPrimary();
+ var secondary = replSet.getSecondary();
assert.eq(primary.host, nodes[0], "primary assumed to be node 0");
jsTestLog("do a write then ask the PRIMARY to stepdown");
@@ -72,11 +73,10 @@
replSet.unPartition(1,0);
replSet.unPartition(1,2);
- replSet.waitForState(primary, replSet.SECONDARY, 30000);
+ replSet.waitForState(secondary, replSet.PRIMARY, 30000);
jsTestLog("signal update thread to exit");
var newPrimary = replSet.getPrimary();
- assert.neq(primary, newPrimary, "SECONDARY did not become PRIMARY");
assert.writeOK(newPrimary.getDB(name).foo.remove({}));
stepDowner();
writer();