Skip to content

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Jul 21, 2025

The nuxt module tests run the module in dev mode (because that's the point of our nuxt module), which results in HMR being enabled. Unlike the main vite port, there's no dynamic port selection for the HMR WebSocket port, so when the test files run in parallel they often conflict by trying to bind to the same port.

I could harcode two different ports with vite.server.hmr.port, but there's very little value to exercising the HMR code path with these tests, so I just disabled it.

See very similar Astro testing issue similarly resolved by vitejs/vite#16219.

@serhalp serhalp force-pushed the serhalp/frb-1943-fix-ci-flakes-in-netlifyprimitives branch from 5b258e3 to 247affc Compare July 21, 2025 21:21
The nuxt module tests run the module in dev mode (because that's the point of our nuxt module),
which results in HMR being enabled. Unlike the main vite port, there's no dynamic port selection
for the HMR WebSocket port, so when the test files run in parallel they often conflict by trying to
bind to the same port.

I could harcode two different ports with `vite.server.hmr.port`, but there's very little value to
exercising the HMR code path with these tests, so I just disabled it.

See also very similar withastro/astro#11744.
@serhalp serhalp force-pushed the serhalp/frb-1943-fix-ci-flakes-in-netlifyprimitives branch from 247affc to 7f27bc5 Compare July 21, 2025 21:30
@serhalp serhalp marked this pull request as ready for review July 21, 2025 22:53
@serhalp serhalp requested a review from a team as a code owner July 21, 2025 22:53
@pieh pieh merged commit 4386ac8 into main Jul 22, 2025
19 of 21 checks passed
@pieh pieh deleted the serhalp/frb-1943-fix-ci-flakes-in-netlifyprimitives branch July 22, 2025 07:34
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.

3 participants