summaryrefslogtreecommitdiff
path: root/jstests/replsets/catchup.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2016-11-07 14:28:24 -0500
committerBenety Goh <benety@mongodb.com>2016-11-07 15:54:09 -0500
commitd4a7ae574011cf40e7785c439969904954e18db2 (patch)
tree1906f4d588ea4a841ebf123fa85e7e9928cb9af6 /jstests/replsets/catchup.js
parent9a0127c107c8b3f1e80453075848c4372a25e075 (diff)
downloadmongo-d4a7ae574011cf40e7785c439969904954e18db2.tar.gz
SERVER-26934 removed hardcoded ReplSetTest.awaitReplication timeouts from JS tests
Diffstat (limited to 'jstests/replsets/catchup.js')
-rw-r--r--jstests/replsets/catchup.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/replsets/catchup.js b/jstests/replsets/catchup.js
index 8bf0bc08ead..407735bd604 100644
--- a/jstests/replsets/catchup.js
+++ b/jstests/replsets/catchup.js
@@ -96,14 +96,14 @@ load("jstests/replsets/rslib.js");
jsTest.log("Case 1: The primary is up-to-date after freshness scan.");
// Should complete transition to primary immediately.
- rst.awaitReplication(30000, ReplSetTest.OpTimeType.LAST_DURABLE);
+ rst.awaitReplication(ReplSetTest.kDefaultTimeoutMS, ReplSetTest.OpTimeType.LAST_DURABLE);
var newPrimary = stepUp(rst.getSecondary());
rst.awaitNodesAgreeOnPrimary();
// Should win an election and finish the transition very quickly.
assert.eq(newPrimary, rst.getPrimary());
jsTest.log("Case 2: The primary needs to catch up, succeeds in time.");
- rst.awaitReplication(30000, ReplSetTest.OpTimeType.LAST_DURABLE);
+ rst.awaitReplication(ReplSetTest.kDefaultTimeoutMS, ReplSetTest.OpTimeType.LAST_DURABLE);
// Write documents that cannot be replicated to secondaries in time.
var originalSecondaries = rst.getSecondaries();
originalSecondaries.forEach(enableFailPoint);
@@ -124,7 +124,7 @@ load("jstests/replsets/rslib.js");
checkOpInOplog(newPrimary, latestOp, 1);
jsTest.log("Case 3: The primary needs to catch up, fails due to timeout.");
- rst.awaitReplication(30000, ReplSetTest.OpTimeType.LAST_DURABLE);
+ rst.awaitReplication(ReplSetTest.kDefaultTimeoutMS, ReplSetTest.OpTimeType.LAST_DURABLE);
// Write documents that cannot be replicated to secondaries in time.
originalSecondaries = rst.getSecondaries();
originalSecondaries.forEach(enableFailPoint);
@@ -152,7 +152,7 @@ load("jstests/replsets/rslib.js");
disableFailPoint(originalSecondaries[1]);
jsTest.log("Case 4: The primary needs to catch up, but has to change sync source to catch up.");
- rst.awaitReplication(30000, ReplSetTest.OpTimeType.LAST_DURABLE);
+ rst.awaitReplication(ReplSetTest.kDefaultTimeoutMS, ReplSetTest.OpTimeType.LAST_DURABLE);
// Write documents that cannot be replicated to secondaries in time.
rst.getSecondaries().forEach(enableFailPoint);
doWrites(rst.getPrimary());