diff options
| author | Antonio Fuschetto <antonio.fuschetto@mongodb.com> | 2024-04-16 14:08:01 +0000 |
|---|---|---|
| committer | MongoDB Bot <mongo-bot@mongodb.com> | 2024-04-16 15:02:18 +0000 |
| commit | addcee0cdc5ec13bb87cc613a9d6ecd1119df95c (patch) | |
| tree | 9fd2b157a81bd56723d712749488c39387dc7b59 | |
| parent | fd2eb97079ee86b8f220ac71bf977e33d102219a (diff) | |
SERVER-89414 Harden shard removal in a `store_historical_placement_data.js` test teardown (#21129)r7.3.2-rc0
GitOrigin-RevId: a5f64e2e2147f5a8300542bee986ce6b840d65d0
| -rw-r--r-- | jstests/sharding/store_historical_placement_data.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/jstests/sharding/store_historical_placement_data.js b/jstests/sharding/store_historical_placement_data.js index 6658439a756..ddb4f47bf4c 100644 --- a/jstests/sharding/store_historical_placement_data.js +++ b/jstests/sharding/store_historical_placement_data.js @@ -1,4 +1,5 @@ import {FeatureFlagUtil} from "jstests/libs/feature_flag_util.js"; +import {removeShard} from "jstests/sharding/libs/remove_shard_util.js"; const st = new ShardingTest({ shards: 3, @@ -403,14 +404,7 @@ function testAddShard() { for (const dbName of dbsOnNewReplicaSet) { assert.commandWorked(st.getDB(dbName).dropDatabase()); } - - let res = assert.commandWorked(st.s.adminCommand({removeShard: newShardName})); - if (res.state === 'started') { - // Issue a second removeShard request to sync on the full removal of the targeted RS. - res = assert.commandWorked(st.s.adminCommand({removeShard: newShardName})); - } - - assert.eq('completed', res.state); + removeShard(st, newShardName); newReplicaSet.stopSet(); } |
