summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-11-11 05:34:02 -0500
committermatt dannenberg <matt.dannenberg@10gen.com>2015-11-11 05:36:16 -0500
commit41dd2ff9514d4bc52dca6f8b6bd5366576e651aa (patch)
tree92ffad7f5923b82341617445c3434e1b874696b9 /jstests
parenta707b9852bf6e03e7d6e6ef3ad464dbd28d690fa (diff)
downloadmongo-41dd2ff9514d4bc52dca6f8b6bd5366576e651aa.tar.gz
SERVER-21406 extend timeout in rollback2.js when running in pv0
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/rollback2.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/jstests/replsets/rollback2.js b/jstests/replsets/rollback2.js
index 0dc47e93eb6..ef71bfba252 100644
--- a/jstests/replsets/rollback2.js
+++ b/jstests/replsets/rollback2.js
@@ -69,11 +69,23 @@ load("jstests/replsets/rslib.js");
a.createCollection("kap2", { capped: true, size: 5501 });
replTest.awaitReplication();
+ var timeout;
+ if (replTest.getConfigFromPrimary().protocolVersion == 1) {
+ timeout = 30 * 1000;
+ } else {
+ timeout = 60 * 1000;
+ }
// isolate A and wait for B to become master
conns[0].disconnect(conns[1]);
conns[0].disconnect(conns[2]);
- assert.soon(function () { try { return B.isMaster().ismaster; } catch(e) { return false; } });
-
+ assert.soon(function () {
+ try {
+ return B.isMaster().ismaster;
+ } catch(e) {
+ return false;
+ }
+ }, timeout);
+
// do operations on B and B alone, these will be rolled back
assert.writeOK(b.bar.insert({ q: 4 }));
assert.writeOK(b.bar.update({ q: 3 }, { q: 3, rb: true }));