summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2016-09-20 17:27:32 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2016-09-21 15:40:51 -0400
commit3ac7edb98cc00dc72a5a3b5970d53c747b49027a (patch)
tree839289a965d60287cec772e781a2dd35ca349bea /jstests
parent40b4b8442db727b89579a12345c1bb37959542d4 (diff)
downloadmongo-3ac7edb98cc00dc72a5a3b5970d53c747b49027a.tar.gz
SERVER-26140 Increase initial sync retry times to 3.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/initial_sync_fail_insert_once.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/replsets/initial_sync_fail_insert_once.js b/jstests/replsets/initial_sync_fail_insert_once.js
index c0f47f92c1a..a565c64216d 100644
--- a/jstests/replsets/initial_sync_fail_insert_once.js
+++ b/jstests/replsets/initial_sync_fail_insert_once.js
@@ -1,11 +1,13 @@
/**
* Tests that initial sync can complete after a failed insert to a cloned collection.
+ * The failpoint may fail once or twice depending on the order of the results of listCollection,
+ * so we allow initial sync to retry 3 times.
*/
(function() {
var name = 'initial_sync_fail_insert_once';
var replSet = new ReplSetTest(
- {name: name, nodes: 2, nodeOptions: {setParameter: "numInitialSyncAttempts=2"}});
+ {name: name, nodes: 2, nodeOptions: {setParameter: "numInitialSyncAttempts=3"}});
replSet.startSet();
replSet.initiate();
@@ -18,7 +20,7 @@
jsTest.log("Enabling Failpoint failCollectionInserts on " + tojson(secondary));
assert.commandWorked(secondary.getDB("admin").adminCommand({
configureFailPoint: "failCollectionInserts",
- mode: {times: 1},
+ mode: {times: 2},
data: {collectionNS: coll.getFullName()}
}));