From 31ba99f6c3385014b56e4f358c5cc9320d6c293d Mon Sep 17 00:00:00 2001 From: Eric Milkie Date: Fri, 14 Jun 2013 14:58:46 -0400 Subject: SERVER-9694 fix for slow disk'd test runners --- jstests/replsets/stepdown3.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.1