diff options
Diffstat (limited to 'jstests/sharding/convert_to_and_from_sharded.js')
-rw-r--r-- | jstests/sharding/convert_to_and_from_sharded.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/jstests/sharding/convert_to_and_from_sharded.js b/jstests/sharding/convert_to_and_from_sharded.js index a4a3cd10ef4..340580b5dbf 100644 --- a/jstests/sharding/convert_to_and_from_sharded.js +++ b/jstests/sharding/convert_to_and_from_sharded.js @@ -5,6 +5,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", @@ -96,15 +97,10 @@ for (x = 0; x < 2; x++) { checkBasicCRUD(st.s.getDB('test').unsharded); checkBasicCRUD(st.s.getDB('test').sharded); -assert.commandWorked(st.s.adminCommand({removeShard: 'toRemoveLater'})); - // Start the balancer to start draining the chunks. st.startBalancer(); -assert.soon(function() { - var res = st.s.adminCommand({removeShard: 'toRemoveLater'}); - return res.state == 'completed'; -}); +removeShard(st, 'toRemoveLater'); newShard.stopSet(); |