Skip to content

Commit 5c5785c

Browse files
authored
Merge pull request #6489 from opsmill/pog-trigger-test-setup
Correct code for wait for prefect automations
2 parents 4d2976a + 9fb7beb commit 5c5785c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backend/tests/integration_docker/test_triggered_actions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,18 @@ async def load_initial_data(
8383

8484
async def wait_until_automations_are_configured(self, automation_names: list[str], client: PrefectClient) -> None:
8585
continue_waiting = True
86-
max_retries = 10
86+
max_retries = 30
8787
retry = 0
8888

8989
while continue_waiting:
9090
automations = await client.read_automations()
91-
automation_names = [automation.name.split(NAME_SEPARATOR)[-1] for automation in automations]
92-
if all(item in automation_names for item in automation_names):
91+
observed_automation_names = [automation.name.split(NAME_SEPARATOR)[-1] for automation in automations]
92+
if set(automation_names).issubset(observed_automation_names):
9393
continue_waiting = False
9494
else:
9595
retry += 1
9696
if retry >= max_retries:
97-
assert all(item in automation_names for item in automation_names)
97+
assert set(automation_names).issubset(observed_automation_names)
9898
await asyncio.sleep(1)
9999

100100
async def test_create_main_triggers(

0 commit comments

Comments
 (0)