Skip to content

test: deflake test-net-listen-ipv6only#64173

Open
Han5991 wants to merge 2 commits into
nodejs:mainfrom
Han5991:fix/flaky-test-net-listen-ipv6only
Open

test: deflake test-net-listen-ipv6only#64173
Han5991 wants to merge 2 commits into
nodejs:mainfrom
Han5991:fix/flaky-test-net-listen-ipv6only

Conversation

@Han5991

@Han5991 Han5991 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

test-net-listen-ipv6only connects to the IPv4 side of an ephemeral port
expecting ECONNREFUSED, but never reserves that port, so under parallel
execution another test can occupy it and the connection succeeds instead —
making the test flaky (it passes reliably in isolation).

Move the test to test/sequential/ and use a fixed common.PORT so it no
longer competes with other tests for the same port. This is the same fix
previously applied to the sibling cluster variants (#26298, #32381, #32398).

Fixes: #64172

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 27, 2026
Han5991 added 2 commits June 28, 2026 00:14
The test verified ipv6Only by connecting to the IPv4 side of an
ephemeral port and expecting ECONNREFUSED, but it never reserved that
IPv4 port. Under parallel execution another test could occupy it,
making the connection succeed instead of being refused.

Run the test sequentially with a fixed common.PORT so it no longer
competes with other tests for the same port, matching the fix already
applied to the sibling cluster variants.

Fixes: nodejs#64172
Signed-off-by: sangwook <rewq5991@gmail.com>
@Han5991 Han5991 force-pushed the fix/flaky-test-net-listen-ipv6only branch from 29bd615 to 91860b2 Compare June 27, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-net-listen-ipv6only is flaky due to IPv4 port collision

2 participants