Skip to content

test: fix flaky assets build watch failures - #23496

Open
nulluid wants to merge 1 commit into
vitejs:mainfrom
nulluid:test/assets-build-watch-wait
Open

nulluid wants to merge 1 commit into
vitejs:mainfrom
nulluid:test/assets-build-watch-wait

Conversation

@nulluid

@nulluid nulluid commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Tests failed in the CI/CD on my PR #23484. But, they pass repeatedly on my machine. Reviewing the logs it looks like this is happening to other people as well and it is a flake.

I believe the problem is that notifyRebuildComplete resolves on the first END. Moving reload inside expect.poll fixes the problem.

I can reproduce the flake by forcing the rebuild wait to resolve early. After this change tests still pass even when forcing the early resolve.

The time it takes the tests to run before vs. after is the same, so this does not hurt performance.

AI Use:
Qwen3 Coder 30B 4-bit suggested changes that I did not like. I consulted it but used nothing from it. I used Fable 5.1 to look through the log history to find the flake pattern and assist in the fix. I also used it to automate looping through tests. All English writing is my own :)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant