summaryrefslogtreecommitdiff
path: root/jstests/sharding/remove_shard_with_zones.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/remove_shard_with_zones.js')
-rw-r--r--jstests/sharding/remove_shard_with_zones.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/remove_shard_with_zones.js b/jstests/sharding/remove_shard_with_zones.js
index bb5ed329848..2e8d4ebed2f 100644
--- a/jstests/sharding/remove_shard_with_zones.js
+++ b/jstests/sharding/remove_shard_with_zones.js
@@ -4,6 +4,7 @@
*/
(function() {
'use strict';
+load('jstests/sharding/libs/remove_shard_util.js');
// TODO SERVER-50144 Remove this and allow orphan checking.
// This test calls removeShard which can leave docs in config.rangeDeletions in state "pending",
@@ -24,7 +25,7 @@ assert.commandWorked(st.s.adminCommand({addShardToZone: st.shard1.shardName, zon
assert.commandWorked(st.s.adminCommand({addShardToZone: st.shard2.shardName, zone: "zoneC"}));
// Can remove the only shard for a zone if that zone does not have any chunk ranges.
-assert.commandWorked(st.s.adminCommand({removeShard: st.shard1.shardName}));
+removeShard(st, st.shard1.shardName);
// Cannot remove the only shard for a zone if that zone has chunk ranges associated with it.
assert.commandWorked(
@@ -34,7 +35,7 @@ assert.commandFailedWithCode(st.s.adminCommand({removeShard: st.shard2.shardName
// Can remove a shard is if it is not the only shard for any zone.
assert.commandWorked(st.s.adminCommand({addShardToZone: st.shard0.shardName, zone: "zoneC"}));
-assert.commandWorked(st.s.adminCommand({removeShard: st.shard2.shardName}));
+removeShard(st, st.shard2.shardName);
st.stop();
})();