diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 2fe0b2d086..8a2ad24aa3 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -1036,10 +1036,10 @@ async def wait_for_idle_on_blocked( unit = ops_test.model.units.get(f"{database_app_name}/{unit_number}") await asyncio.gather( ops_test.model.wait_for_idle(apps=[other_app_name], status="active"), - ops_test.model.wait_for_idle( - apps=[database_app_name], status="blocked", raise_on_blocked=False + ops_test.model.block_until( + lambda: unit.workload_status == "blocked" + and unit.workload_status_message == status_message ), - ops_test.model.block_until(lambda: unit.workload_status_message == status_message), )