summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@mongodb.com>2020-03-26 14:39:09 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-28 00:18:40 +0000
commit93bedf90e75705e74e946c210913c7a6c3230270 (patch)
treeb157a419aceebcc1fb625de3657e69055ee68190
parenta7b3af69ea629995ff89695622b3121457f969b6 (diff)
downloadmongo-93bedf90e75705e74e946c210913c7a6c3230270.tar.gz
SERVER-46944 Re-enable tests in sharding_last_stable_mongos_and_mixed_shards and sharding_multiversion
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_multiversion.yml1
-rw-r--r--jstests/sharding/allow_partial_results.js11
-rw-r--r--jstests/sharding/create_idx_empty_primary.js4
-rw-r--r--jstests/sharding/index_and_collection_option_propagation.js5
4 files changed, 6 insertions, 15 deletions
diff --git a/buildscripts/resmokeconfig/suites/sharding_multiversion.yml b/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
index dcaf227dc90..120f8cf02e4 100644
--- a/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
@@ -6,7 +6,6 @@ selector:
exclude_with_any_tags:
- multiversion_incompatible
- requires_fcv_44
- - need_fixing_for_46
exclude_files:
# Enable when 4.4 becomes last stable
- jstests/sharding/killop.js
diff --git a/jstests/sharding/allow_partial_results.js b/jstests/sharding/allow_partial_results.js
index 8a4c08a3837..4aa13ab0156 100644
--- a/jstests/sharding/allow_partial_results.js
+++ b/jstests/sharding/allow_partial_results.js
@@ -1,8 +1,6 @@
/**
* Tests that the 'allowPartialResults' option to find is respected, and that aggregation does not
* accept the 'allowPartialResults' option.
- *
- * @tags: [need_fixing_for_46]
*/
// This test shuts down a shard.
@@ -14,7 +12,6 @@ TestData.skipCheckingIndexesConsistentAcrossCluster = true;
const dbName = "test";
const collName = "foo";
const ns = dbName + "." + collName;
-const isLastStable = (jsTestOptions().mongosBinVersion == "last-stable");
const st = new ShardingTest({shards: 2});
@@ -82,7 +79,7 @@ getMoreRes = coll.runCommand(
{getMore: findRes.cursor.id, collection: collName, batchSize: nRemainingDocs + 1});
assert.commandWorked(getMoreRes);
assert.eq(nRemainingDocs, getMoreRes.cursor.nextBatch.length);
-assert.eq(isLastStable ? undefined : true, getMoreRes.cursor.partialResultsReturned);
+assert.eq(true, getMoreRes.cursor.partialResultsReturned);
jsTest.log("Without 'allowPartialResults', if some shards are down, find fails.");
assert.commandFailed(coll.runCommand({find: collName}));
@@ -97,7 +94,7 @@ jsTest.log(
findRes = coll.runCommand({find: collName, allowPartialResults: true, batchSize: batchSize});
assert.commandWorked(findRes);
assert.eq(batchSize, findRes.cursor.firstBatch.length);
-assert.eq(isLastStable ? undefined : true, findRes.cursor.partialResultsReturned);
+assert.eq(true, findRes.cursor.partialResultsReturned);
nRemainingDocs -= batchSize;
jsTest.log(
@@ -106,7 +103,7 @@ getMoreRes =
coll.runCommand({getMore: findRes.cursor.id, collection: collName, batchSize: batchSize});
assert.commandWorked(getMoreRes);
assert.eq(batchSize, getMoreRes.cursor.nextBatch.length);
-assert.eq(isLastStable ? undefined : true, getMoreRes.cursor.partialResultsReturned);
+assert.eq(true, getMoreRes.cursor.partialResultsReturned);
nRemainingDocs -= batchSize;
jsTest.log(
@@ -114,7 +111,7 @@ jsTest.log(
getMoreRes = coll.runCommand({getMore: findRes.cursor.id, collection: collName});
assert.commandWorked(getMoreRes);
assert.eq(nRemainingDocs, getMoreRes.cursor.nextBatch.length);
-assert.eq(isLastStable ? undefined : true, getMoreRes.cursor.partialResultsReturned);
+assert.eq(true, getMoreRes.cursor.partialResultsReturned);
jsTest.log("The allowPartialResults option does not currently apply to aggregation.");
assert.commandFailedWithCode(coll.runCommand({
diff --git a/jstests/sharding/create_idx_empty_primary.js b/jstests/sharding/create_idx_empty_primary.js
index ff89347f8e3..2641d7f7416 100644
--- a/jstests/sharding/create_idx_empty_primary.js
+++ b/jstests/sharding/create_idx_empty_primary.js
@@ -1,7 +1,5 @@
/**
- * Test to make sure that the createIndex command gets sent to all shards if the mongos
- * version is last-stable, and to shards that own chunks only if the mongos version is
- * latest.
+ * Test to make sure that the createIndex command gets sent to shards that own chunks.
*/
(function() {
'use strict';
diff --git a/jstests/sharding/index_and_collection_option_propagation.js b/jstests/sharding/index_and_collection_option_propagation.js
index e24d8c9f064..32d9a1809b2 100644
--- a/jstests/sharding/index_and_collection_option_propagation.js
+++ b/jstests/sharding/index_and_collection_option_propagation.js
@@ -2,10 +2,7 @@
* Mongos has special targeting behavior for createIndex, reIndex, dropIndex, and collMod:
*
* - If called on an unsharded collection, the request is routed only to the primary shard.
- * - If called on a sharded collection, in v4.4 the request is broadcast to shards with chunks;
- * in previous versions, the request is broadcast to all shards but NamespaceNotFound and
- * CannotImplicitlyCreateCollection errors do not lead to command failure (though these errors
- * are reported in the 'raw' shard responses) as long as at least one shard returns success.
+ * - If called on a sharded collection, the request is broadcast to shards with chunks.
*
* This test verifies this behavior.
*/