Skip to content

Commit 1595470

Browse files
author
Andrei Neagu
committed
try to fix flaky
1 parent cb6e86e commit 1595470

File tree

1 file changed

+4
-2
lines changed
  • services/dynamic-scheduler/tests/unit/services/generic_scheduler

1 file changed

+4
-2
lines changed

services/dynamic-scheduler/tests/unit/services/generic_scheduler/test__core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,10 @@ async def test_wait_for_manual_intervention(
10711071
await _ensure_keys_in_store(selected_app, expected_keys=formatted_expected_keys)
10721072

10731073
# even if cancelled, state of waiting for manual intervention remains the same
1074-
with pytest.raises(CannotCancelWhileWaitingForManualInterventionError):
1075-
await cancel_operation(selected_app, schedule_id)
1074+
async for attempt in AsyncRetrying(**_RETRY_PARAMS):
1075+
with attempt: # noqa: SIM117
1076+
with pytest.raises(CannotCancelWhileWaitingForManualInterventionError):
1077+
await cancel_operation(selected_app, schedule_id)
10761078

10771079
await _ensure_keys_in_store(selected_app, expected_keys=formatted_expected_keys)
10781080

0 commit comments

Comments
 (0)