summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2016-12-29 17:53:37 -0500
committerJack Mulrow <jack.mulrow@mongodb.com>2017-01-17 10:41:16 -0500
commitfb49aaed2057a20aae0f9d0ff41b69d43f118e39 (patch)
tree2aecac389be0b579bca8cd5e2442c5e26e8d1b96
parent0c568d25c5e23401ec040f2d16501c0047c3d202 (diff)
downloadmongo-fb49aaed2057a20aae0f9d0ff41b69d43f118e39.tar.gz
SERVER-27544 shutdown_primary.js shouldn't try to disable rsSyncStopApply failpoint on primary
(cherry picked from commit cfacda99c7cd7ceaee14969e50d55f2f31dc4e79)
-rw-r--r--jstests/libs/write_concern_util.js6
-rw-r--r--jstests/replsets/shutdown_primary.js4
2 files changed, 8 insertions, 2 deletions
diff --git a/jstests/libs/write_concern_util.js b/jstests/libs/write_concern_util.js
index 476a9c3e818..bfbd3b024a0 100644
--- a/jstests/libs/write_concern_util.js
+++ b/jstests/libs/write_concern_util.js
@@ -33,6 +33,12 @@ function restartReplSetReplication(rs) {
rs.nodes.forEach(restartServerReplication);
}
+// Restarts replication at all replicaset secondaries.
+function restartReplicationOnSecondaries(rs) {
+ var secondaries = rs.getSecondaries();
+ secondaries.forEach(restartServerReplication);
+}
+
// Restarts replication at all nodes in a sharded cluster.
function restartReplicationOnAllShards(st) {
st._rsObjects.forEach(restartReplSetReplication);
diff --git a/jstests/replsets/shutdown_primary.js b/jstests/replsets/shutdown_primary.js
index 2299900e21c..66d429dec89 100644
--- a/jstests/replsets/shutdown_primary.js
+++ b/jstests/replsets/shutdown_primary.js
@@ -13,7 +13,7 @@
*/
(function() {
load("jstests/libs/write_concern_util.js"); // for stopReplicationOnSecondaries,
- // restartReplSetReplication
+ // restartReplicationOnSecondaries
"use strict";
@@ -48,7 +48,7 @@
}, primary.port);
jsTestLog("Resuming replication.");
- restartReplSetReplication(replTest);
+ restartReplicationOnSecondaries(replTest);
jsTestLog("Verifying primary shut down and cannot be connected to.");
// Successfully starting shutdown throws a network error.