diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2019-10-08 18:11:41 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-08 18:11:41 +0000 |
commit | 150406020cc1b77e4b8ce411e4d5723d03e323ca (patch) | |
tree | 3266a0d37345ed38be5faca2aabc4d08fd0ef859 | |
parent | 50fd4549162cd71617cabbb4e802a44c51f8afc2 (diff) | |
download | mongo-150406020cc1b77e4b8ce411e4d5723d03e323ca.tar.gz |
SERVER-38884 Update multiversion tests to reflect use shards as replica sets in 4.2 onwards
5 files changed, 18 insertions, 16 deletions
diff --git a/jstests/multiVersion/balancer_multiVersion_detect.js b/jstests/multiVersion/balancer_multiVersion_detect.js index b6d8bd4bed6..0975d557e1c 100644 --- a/jstests/multiVersion/balancer_multiVersion_detect.js +++ b/jstests/multiVersion/balancer_multiVersion_detect.js @@ -8,8 +8,7 @@ var options = { mongosOptions: {verbose: 1, useLogFiles: true}, configOptions: {}, shardOptions: {binVersion: ["latest", "last-stable"]}, - enableBalancer: true, - other: {shardAsReplicaSet: false} + enableBalancer: true }; var st = new ShardingTest({shards: 3, mongos: 1, other: options}); diff --git a/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js b/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js index cee8e07ad71..94fdb1172f3 100644 --- a/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js +++ b/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js @@ -6,6 +6,8 @@ (function() { "use strict"; +// TODO: SERVER-43881 Make migration_between_mixed_FCV_mixed_version_mongods.js start shards as +// replica sets. let st = new ShardingTest({ shards: [{binVersion: "latest"}, {binVersion: "last-stable"}], mongos: {binVersion: "latest"}, diff --git a/jstests/multiVersion/migration_between_mixed_version_mongods.js b/jstests/multiVersion/migration_between_mixed_version_mongods.js index bd6b41b0e16..ef9b7623f6b 100644 --- a/jstests/multiVersion/migration_between_mixed_version_mongods.js +++ b/jstests/multiVersion/migration_between_mixed_version_mongods.js @@ -20,7 +20,7 @@ var options = { {binVersion: "latest"} ], mongos: 1, - other: {mongosOptions: {binVersion: "last-stable"}, shardAsReplicaSet: false} + other: {mongosOptions: {binVersion: "last-stable"}} }; var st = new ShardingTest(options); diff --git a/jstests/multiVersion/new_mongos_old_mongod_wire_version_clash.js b/jstests/multiVersion/new_mongos_old_mongod_wire_version_clash.js index ee9b5e65032..9cabb890862 100644 --- a/jstests/multiVersion/new_mongos_old_mongod_wire_version_clash.js +++ b/jstests/multiVersion/new_mongos_old_mongod_wire_version_clash.js @@ -6,8 +6,7 @@ * Note that the precise errors and failure modes caught here are not documented, * and are not depended upon by deployed systems. If improved error handling * results in this test failing, this test may be updated to reflect the actual - * error reported. In particular, a change that causes a failure to report - * ErrorCodes.IncompatibleServerVersion here would generally be an improvement. + * error reported. */ // Checking UUID consistency involves talking to a shard node, which in this test is shutdown @@ -23,11 +22,7 @@ TestData.skipCheckingUUIDsConsistentAcrossCluster = true; */ var st = new ShardingTest({ shards: 1, - other: { - mongosOptions: {binVersion: 'last-stable'}, - shardOptions: {binVersion: 'last-stable'}, - shardAsReplicaSet: false - } + other: {mongosOptions: {binVersion: 'last-stable'}, shardOptions: {binVersion: 'last-stable'}} }); assert.commandWorked(st.s.adminCommand({enableSharding: 'test'})); @@ -38,26 +33,31 @@ var newMongos = MongoRunner.runMongos({configdb: st._configDB}); // Write commands report failure by returning writeError: +// TODO: SERVER-43835 ReplicaSetMonitor converts all failed host errors to +// FailedToSatisfyReadPreference. ReplicaSetMonitor just keeps retrying after +// IncompatibleServerVersion errors and eventually fails with FailedToSatisfyReadPreference. assert.writeErrorWithCode(newMongos.getDB('test').foo.insert({x: 1}), - ErrorCodes.IncompatibleServerVersion); + ErrorCodes.FailedToSatisfyReadPreference); assert.writeErrorWithCode(newMongos.getDB('test').foo.update({x: 1}, {x: 1, y: 2}), - ErrorCodes.IncompatibleServerVersion); + ErrorCodes.FailedToSatisfyReadPreference); assert.writeErrorWithCode(newMongos.getDB('test').foo.remove({x: 1}), - ErrorCodes.IncompatibleServerVersion); + ErrorCodes.FailedToSatisfyReadPreference); // Query commands, on failure, throw instead: let res; +// TODO: SERVER-43835 ReplicaSetMonitor converts all failed host errors to +// FailedToSatisfyReadPreference. res = newMongos.getDB('test').runCommand({find: 'foo'}); -assert.eq(res.code, ErrorCodes.IncompatibleServerVersion); +assert.eq(res.code, ErrorCodes.FailedToSatisfyReadPreference); res = newMongos.getDB('test').runCommand({find: 'foo', filter: {x: 1}}); -assert.eq(res.code, ErrorCodes.IncompatibleServerVersion); +assert.eq(res.code, ErrorCodes.FailedToSatisfyReadPreference); res = newMongos.getDB('test').runCommand({aggregate: 'foo', pipeline: [], cursor: {}}); -assert.eq(res.code, ErrorCodes.IncompatibleServerVersion); +assert.eq(res.code, ErrorCodes.FailedToSatisfyReadPreference); MongoRunner.stopMongos(newMongos); st.stop(); diff --git a/jstests/multiVersion/upgrade_downgrade_cluster.js b/jstests/multiVersion/upgrade_downgrade_cluster.js index a8265ae23ed..072233fdbca 100644 --- a/jstests/multiVersion/upgrade_downgrade_cluster.js +++ b/jstests/multiVersion/upgrade_downgrade_cluster.js @@ -42,6 +42,7 @@ var runTest = function(isRSCluster) { assert.eq(null, db.foo.findOne()); }; + // TODO: SERVER-43852 Make upgrade_downgrade_cluster.js start shards as replica sets. var st = new ShardingTest({ shards: 2, mongos: 1, |