The GitHub Actions job "Tests (AMD)" on airflow.git/fix/file-trigger-test-race 
has failed.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
e5092625103342f49dd2cafb60d818ff04f11abc / Jarek Potiuk <[email protected]>
Fix flaky FileTrigger/FileDeleteTrigger tests by awaiting the task

`test_task_file_trigger` and `test_file_delete_trigger` waited
`asyncio.sleep(0.5)` after `p.touch()` and then asserted on the
trigger's effect (task.done() / file gone). The trigger has to wake
from its poll-interval sleep, run `is_file()`, run `stat()`, (for the
delete variant) run `unlink()`, log, and yield. With anyio's thread-
pool-backed file ops, 0.5s isn't always enough on slow runners — the
Pendulum2 ARM job repeatedly hits the race in `test_file_delete_trigger`
("Found file" is logged but unlink hasn't returned by the time the
assertion runs).

Switch to `await asyncio.wait_for(task, timeout=5.0)` so the assertion
can't race the trigger's detect → yield cycle. Once the task is done,
the trigger has completed all its work (including unlink for the
delete trigger), so the file-existence assertion is deterministic.

Also drop the `asyncio.get_event_loop().stop()` cleanup line. It was
protecting against the pending task left behind by the fixed-sleep
pattern; with `wait_for`, there's no pending task and pytest-asyncio's
own teardown handles loop lifecycle.

Report URL: https://github.com/apache/airflow/actions/runs/25756588378

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to