summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2013-06-14 14:58:46 -0400
committerEric Milkie <milkie@10gen.com>2013-06-14 15:00:37 -0400
commit31ba99f6c3385014b56e4f358c5cc9320d6c293d (patch)
treedc4dbd3f2a337c38366d948bfbae48928d944f4c
parent1378421212e0afbc048e403a24e89cf25c5586a1 (diff)
downloadmongo-31ba99f6c3385014b56e4f358c5cc9320d6c293d.tar.gz
SERVER-9694 fix for slow disk'd test runners
-rw-r--r--jstests/replsets/stepdown3.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jstests/replsets/stepdown3.js b/jstests/replsets/stepdown3.js
index fd99cd4608a..4b90ce99a2f 100644
--- a/jstests/replsets/stepdown3.js
+++ b/jstests/replsets/stepdown3.js
@@ -11,6 +11,11 @@ print("\ndo a write");
master.getDB("test").foo.insert({x:1});
replTest.awaitReplication();
+// do another write, because the first one might be longer than 10 seconds ago
+// on the secondary (due to starting up), and we need to be within 10 seconds
+// to step down.
+master.getDB("test").foo.insert({x:2});
+master.getDB("test").runCommand({getLastError : 1, w : 2, wtimeout : 30000 });
// lock secondary, to pause replication
print("\nlock secondary");
var locked = replTest.liveNodes.slaves[0];
@@ -18,7 +23,7 @@ printjson( locked.getDB("admin").runCommand({fsync : 1, lock : 1}) );
// do a write
print("\ndo a write");
-master.getDB("test").foo.insert({x:2});
+master.getDB("test").foo.insert({x:3});
// step down the primary asyncronously
print("stepdown");