bbovenzi opened a new pull request, #77223:
URL: https://github.com/apache/airflow/pull/77223

   In the week to Nov 12, the React UI test job failed 10 times on five tests. 
Each was waiting on real asynchronous work that a busy runner finished just 
after its deadline:
   
   | Test | CI failures | Failed at |
   |---|---|---|
   | `DagsFilters` › defaults to showing only active dags | 6 | ~1.1s |
   | `BackfillsDateFilter` › shows all backfills when no date filter is applied 
| 6 | ~1.2s |
   | `DagsList.test.tsx` (route import in `beforeAll`) | 3 | 10s hook limit |
   | `SearchDagRuns` › reaches past the listed runs when searched | 1 | ~1.05s |
   | `SearchMapIndexes` › searches the task's instances by rendered map index | 
1 | ~1.04s |
   
   Six of those PRs changed no UI files and ran the suite only because CI ran 
everything.
   
   **Changes**
   
   - Testing Library's async wait goes from 1s to 3s, set once in 
`testsSetup.ts`, and the per-test timeout from 5s to 15s to fit a few such 
waits. Three tests that already raised their own wait to 3s now use the default.
   - The 12 test files that loaded their routes in a `beforeAll` now `await 
preloadAppRoutes(...)` at the top of the file. Module collection has no time 
limit, while hooks have 10s.
   - `SearchDagRuns` and `SearchMapIndexes` move a fake clock past their 300ms 
search debounce instead of waiting for it.
   - `DagsFilters` and `BackfillsDateFilter` no longer render the whole app for 
every test:
     - The pill's URL handling is tested on the filter bar alone, plus 
`usePausedDefault` the way `DagsList` uses it.
     - The URL ↔ pill ↔ API query mapping in `pausedStateParams` gets its own 
unit tests. That logic already existed; these replace coverage the full-page 
tests used to provide.
     - A handful of full-page tests remain, to check what the Dags list asks 
the API for. They include the "paused default on the first request" test from 
#76689.
     - `BackfillsDateFilter` renders `<Backfills />` alone against the mock API.
   
   Trade-off: a test that genuinely fails a `findBy`/`waitFor` now takes up to 
3s, not 1s, to report it.
   
   **Testing**
   
   - Full UI suite with twice as many workers as cores, to mimic a loaded 
runner: before these changes 21 and 10 failures, covering every test above; 
after, none.
   - Full suite on this branch, rebased on main: 2457 of 2458 passed. The one 
failure, `configureMonaco.test.ts` › registers go for lazy loading, hit its own 
30s limit while importing Monaco under load, and passes in about 1s alone. This 
PR doesn't touch that test.
   - Simple auth manager UI tests pass. Static checks (pre-commit and manual 
stages) pass.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to