summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2018-11-05 16:59:18 -0500
committerEsha Maharishi <esha.maharishi@mongodb.com>2018-11-15 23:20:19 -0500
commitaf1d3c629bbdc265fd4b11d22234ac63c349d0be (patch)
treeb4a672b325e8d982d7d2fbb9a504d21bf35786a8 /jstests
parentc59376d6ced1b1d90f057238158b9503e3a836be (diff)
downloadmongo-af1d3c629bbdc265fd4b11d22234ac63c349d0be.tar.gz
SERVER-37932 Remove erroneous part of coll_epoch_test1.js that attempts to test something that shouldn't work, but due to a bug in the test, the test passes
(cherry picked from commit 2a23784057167cbd74321155fc169cd08f562405)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/coll_epoch_test1.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/jstests/sharding/coll_epoch_test1.js b/jstests/sharding/coll_epoch_test1.js
index 3ffb3f16e82..acaf51fd0e2 100644
--- a/jstests/sharding/coll_epoch_test1.js
+++ b/jstests/sharding/coll_epoch_test1.js
@@ -79,40 +79,5 @@
assert.eq(100, staleMongos.getCollection(coll + "").find({test: "c"}).itcount());
assert.eq(0, staleMongos.getCollection(coll + "").find({test: {$in: ["a", "b"]}}).itcount());
- assert(coll.drop());
- st.configRS.awaitLastOpCommitted();
-
- //
- // Test that inserts and queries go to correct shard even when the collection has been unsharded
- // and resharded from another mongos on a different primary
- //
-
- jsTest.log("Re-creating sharded collection with different primary...");
-
- var getOtherShard = function(shardId) {
- for (var i = 0; i < shards.length; ++i) {
- if (shards[i].shardName != shardId)
- return shards[i].shardName;
- }
- };
-
- assert.commandWorked(admin.runCommand({
- movePrimary: coll.getDB() + "",
- to: getOtherShard(config.databases.findOne({_id: coll.getDB() + ""}).primary)
- }));
- assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {_id: 1}}));
-
- bulk = insertMongos.getCollection(coll + "").initializeUnorderedBulkOp();
- for (var i = 0; i < 100; i++) {
- bulk.insert({test: "d"});
- }
- assert.writeOK(bulk.execute());
-
- assert.eq(100, staleMongos.getCollection(coll + "").find({test: "d"}).itcount());
- assert.eq(0,
- staleMongos.getCollection(coll + "").find({test: {$in: ["a", "b", "c"]}}).itcount());
-
- assert(coll.drop());
-
st.stop();
})();