summaryrefslogtreecommitdiff
path: root/jstests/multiVersion
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-09-28 05:47:57 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2015-10-01 08:00:10 -0400
commitd789bca4c9fe76cd4d5375e66e281ed5a349e8fd (patch)
treed98b551b8e00ba0c320666f855f3c878414a990a /jstests/multiVersion
parent1cd101f5bdaae56d67ba7df527da5c6e9352620b (diff)
downloadmongo-d789bca4c9fe76cd4d5375e66e281ed5a349e8fd.tar.gz
SERVER-18498 New replica set configurations have protocolVersion=1 by default
This re-adds Siyuan's work from commits 19d2885ec51768ab73eee0c7239d8eadc0c51d8d and 362aac3937e3ff39ee995919a529297488537191.
Diffstat (limited to 'jstests/multiVersion')
-rw-r--r--jstests/multiVersion/2_test_launching_cluster.js5
-rw-r--r--jstests/multiVersion/downgrade_replset.js4
-rw-r--r--jstests/multiVersion/initialsync.js7
-rw-r--r--jstests/multiVersion/mixed_storage_version_replication.js3
-rw-r--r--jstests/multiVersion/upgrade_downgrade_mongod.js4
-rw-r--r--jstests/multiVersion/wt_index_option_defaults_replset.js1
6 files changed, 17 insertions, 7 deletions
diff --git a/jstests/multiVersion/2_test_launching_cluster.js b/jstests/multiVersion/2_test_launching_cluster.js
index 6f00facaea3..014bf98fb6e 100644
--- a/jstests/multiVersion/2_test_launching_cluster.js
+++ b/jstests/multiVersion/2_test_launching_cluster.js
@@ -53,7 +53,7 @@ st = new ShardingTest({ shards : 2,
mongosOptions : { binVersion : versionsToCheck },
configOptions : { binVersion : versionsToCheck },
shardOptions : { binVersion : versionsToCheck }
-
+
} });
shards = [ st.shard0, st.shard1 ];
@@ -98,8 +98,7 @@ st = new ShardingTest({ shards : 2,
mongosOptions : { binVersion : versionsToCheck },
configOptions : { binVersion : versionsToCheck },
- rsOptions : { binVersion : versionsToCheck }
-
+ rsOptions : { binVersion : versionsToCheck, protocolVersion: 0 }
} });
var nodesA = st.rs0.nodes;
diff --git a/jstests/multiVersion/downgrade_replset.js b/jstests/multiVersion/downgrade_replset.js
index 17581827f11..6dd492efab3 100644
--- a/jstests/multiVersion/downgrade_replset.js
+++ b/jstests/multiVersion/downgrade_replset.js
@@ -14,7 +14,9 @@ var nodes = {n1: {binVersion: newVersion},
var rst = new ReplSetTest({name: name, nodes: nodes, nodeOptions: {storageEngine: 'mmapv1'}});
rst.startSet();
-rst.initiate();
+var replSetConfig = rst.getReplSetConfig();
+replSetConfig.protocolVersion = 0;
+rst.initiate(replSetConfig);
var primary = rst.getPrimary();
var coll = "test.foo";
diff --git a/jstests/multiVersion/initialsync.js b/jstests/multiVersion/initialsync.js
index 2fad997bf66..dac71ff24f4 100644
--- a/jstests/multiVersion/initialsync.js
+++ b/jstests/multiVersion/initialsync.js
@@ -14,7 +14,12 @@ var multitest = function(replSetVersion, newNodeVersion) {
print("Start up a two-node " + replSetVersion + " replica set.");
var rst = new ReplSetTest({name: name, nodes: nodes});
rst.startSet();
- rst.initiate();
+ var config = rst.getReplSetConfig();
+ // Set protocol version to 0 for 3.2 replset.
+ if (replSetVersion == newVersion) {
+ config.protocolVersion = 0;
+ }
+ rst.initiate(config);
// Wait for a primary node.
var primary = rst.getPrimary();
diff --git a/jstests/multiVersion/mixed_storage_version_replication.js b/jstests/multiVersion/mixed_storage_version_replication.js
index 888b4465389..a3a6f36c520 100644
--- a/jstests/multiVersion/mixed_storage_version_replication.js
+++ b/jstests/multiVersion/mixed_storage_version_replication.js
@@ -612,7 +612,8 @@ function doMultiThreadedWork(primary, numThreads) {
// Make sure everyone is syncing from the primary, to ensure we have all combinations of
// primary/secondary syncing.
config.settings = {chainingAllowed: false};
- replTest.initiate();
+ config.protocolVersion = 0;
+ replTest.initiate(config);
// Ensure all are synced.
replTest.awaitSecondaryNodes(120000);
var primary = replTest.getPrimary();
diff --git a/jstests/multiVersion/upgrade_downgrade_mongod.js b/jstests/multiVersion/upgrade_downgrade_mongod.js
index 244ea79d71e..35c93318d5e 100644
--- a/jstests/multiVersion/upgrade_downgrade_mongod.js
+++ b/jstests/multiVersion/upgrade_downgrade_mongod.js
@@ -258,7 +258,9 @@
function init_replication(conn){
var testDB = conn.getDB('test');
var testName = this.name;
- var rsconf = {_id: 'oplog', members: [ {_id: 0, host: 'localhost:' + conn.port}]};
+ var rsconf = {_id: 'oplog',
+ members: [ {_id: 0, host: 'localhost:' + conn.port}],
+ protocolVersion: 0};
assert.commandWorked(testDB.adminCommand({replSetInitiate : rsconf}),
testName + ' replSetInitiate');
diff --git a/jstests/multiVersion/wt_index_option_defaults_replset.js b/jstests/multiVersion/wt_index_option_defaults_replset.js
index a5c9c2cb248..451c56f807c 100644
--- a/jstests/multiVersion/wt_index_option_defaults_replset.js
+++ b/jstests/multiVersion/wt_index_option_defaults_replset.js
@@ -24,6 +24,7 @@
// Rig the election so that the 3.2 node becomes the primary.
var replSetConfig = rst.getReplSetConfig();
replSetConfig.members[1].priority = 0;
+ replSetConfig.protocolVersion = 0;
rst.initiate(replSetConfig);