Skip to content

Commit

Permalink
speed up removing application by scaling down
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Nov 1, 2023
1 parent 3ff082e commit 53fa13b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration/sharding_tests/test_sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,16 @@ async def test_unconventual_shard_removal(ops_test: OpsTest):
f"{CONFIG_SERVER_APP_NAME}:{CONFIG_SERVER_REL_NAME}",
)

await ops_test.model.applications[SHARD_TWO_APP_NAME].destroy_units(f"{SHARD_TWO_APP_NAME}/0")
async with ops_test.fast_forward():
await ops_test.model.wait_for_idle(
apps=[SHARD_TWO_APP_NAME],
idle_period=20,
status="active",
timeout=TIMEOUT,
raise_on_error=False,
)

await ops_test.model.remove_application(SHARD_TWO_APP_NAME, block_until_done=True)

async with ops_test.fast_forward():
Expand Down

0 comments on commit 53fa13b

Please sign in to comment.