diff options
Diffstat (limited to 'jstests/sharding/query/current_op_with_drop_shard.js')
-rw-r--r-- | jstests/sharding/query/current_op_with_drop_shard.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/jstests/sharding/query/current_op_with_drop_shard.js b/jstests/sharding/query/current_op_with_drop_shard.js index e654b27733e..f92945fe32a 100644 --- a/jstests/sharding/query/current_op_with_drop_shard.js +++ b/jstests/sharding/query/current_op_with_drop_shard.js @@ -1,6 +1,7 @@ // Tests that currentOp is resilient to drop shard. (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", @@ -15,14 +16,7 @@ st.startBalancer(); const mongosDB = st.s.getDB(jsTestName()); const shardName = st.shard0.shardName; -var res = st.s.adminCommand({removeShard: shardName}); -assert.commandWorked(res); -assert.eq('started', res.state); -assert.soon(function() { - res = st.s.adminCommand({removeShard: shardName}); - assert.commandWorked(res); - return ('completed' === res.state); -}, "removeShard never completed for shard " + shardName); +removeShard(st, shardName); assert.commandWorked(mongosDB.currentOp()); |