summaryrefslogtreecommitdiff
path: root/jstests/sharding/config_version_rollback.js
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2017-01-17 17:06:52 -0500
committerSpencer T Brody <spencer@mongodb.com>2017-01-18 18:05:33 -0500
commit21948042b6da5fb5bf15897f9808a70551f5af09 (patch)
treefbbf09efa69efefc8b14cdb4d4ff9a7260f29e74 /jstests/sharding/config_version_rollback.js
parentfd6971a17400c37ea6bf6c54ef2c04c25201416d (diff)
downloadmongo-21948042b6da5fb5bf15897f9808a70551f5af09.tar.gz
SERVER-27680 Merge stopOplogFetcher and pauseRsBgSyncProducer failpoint into single stopReplProducer failpoint
Diffstat (limited to 'jstests/sharding/config_version_rollback.js')
-rw-r--r--jstests/sharding/config_version_rollback.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/jstests/sharding/config_version_rollback.js b/jstests/sharding/config_version_rollback.js
index 95dc114fb14..2ad468b05bc 100644
--- a/jstests/sharding/config_version_rollback.js
+++ b/jstests/sharding/config_version_rollback.js
@@ -6,7 +6,8 @@
(function() {
"use strict";
- load("jstests/libs/check_log.js");
+
+ load("jstests/libs/write_concern_util.js");
// The config.version document is written on transition to primary. We need to ensure this
// config.version document is rolled back for this test.
@@ -57,12 +58,9 @@
jsTest.log("Waiting for " + nodes[1] + " and " + nodes[2] + " to transition to SECONDARY.");
configRS.waitForState([nodes[1], nodes[2]], ReplSetTest.State.SECONDARY);
- jsTest.log("Stopping the OplogFetcher on all nodes");
+ jsTest.log("Stopping the replication producer on all nodes");
// Now that the secondaries have finished initial sync and are electable, stop replication.
- nodes.forEach(function(node) {
- assert.commandWorked(node.getDB('admin').runCommand(
- {configureFailPoint: 'stopOplogFetcher', mode: 'alwaysOn'}));
- });
+ stopServerReplication([nodes[1], nodes[2]]);
jsTest.log("Allowing the primary to write the config.version doc");
nodes.forEach(function(node) {
@@ -116,10 +114,7 @@
assert.neq(origConfigVersionDoc.clusterId, newConfigVersionDoc.clusterId);
jsTest.log("Re-enabling replication on all nodes");
- nodes.forEach(function(node) {
- assert.commandWorked(
- node.getDB('admin').runCommand({configureFailPoint: 'stopOplogFetcher', mode: 'off'}));
- });
+ restartServerReplication(nodes);
jsTest.log(
"Waiting for original primary to rollback and replicate new config.version document");