summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-03-27 11:52:31 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-05-01 17:33:16 -0400
commit9964889f0936441211cf065a15504cdc5973d646 (patch)
treee07142941580fbf54ffcb4014bf607a190a46d38
parent8f6ff3212b128efd1ff746cabfd5e1f36761fdd7 (diff)
downloadmongo-9964889f0936441211cf065a15504cdc5973d646.tar.gz
SERVER-28513 stale_mongos_updates_and_removes.js should only call ensurePrimaryShard once
(cherry picked from commit 465bd234f7931ced4ab2d4ee12e9d0274b5910d6)
-rw-r--r--jstests/sharding/stale_mongos_updates_and_removes.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/stale_mongos_updates_and_removes.js b/jstests/sharding/stale_mongos_updates_and_removes.js
index 3c345e89113..bacea1f695a 100644
--- a/jstests/sharding/stale_mongos_updates_and_removes.js
+++ b/jstests/sharding/stale_mongos_updates_and_removes.js
@@ -16,7 +16,6 @@
// (used for testing *multi* removes to a *specific* shard key).
var resetCollection = function() {
assert(staleMongos.getCollection(collNS).drop());
- st.ensurePrimaryShard(dbName, st.shard0.shardName);
assert.commandWorked(staleMongos.adminCommand({shardCollection: collNS, key: {x: 1}}));
for (var i = 0; i < numShardKeys; i++) {
assert.writeOK(staleMongos.getCollection(collNS).insert({x: i, fieldToUpdate: 0}));
@@ -184,6 +183,8 @@ var splitPoint = numShardKeys / 2;
assert.commandWorked(st.s.adminCommand({enableSharding: dbName}));
assert.commandWorked(st.s.adminCommand({shardCollection: collNS, key: {x: 1}}));
+st.ensurePrimaryShard(dbName, st.shard0.shardName);
+
var freshMongos = st.s0;
var staleMongos = st.s1;