ktorio / ktorio/ktor

Flaky: CIOWebSocketTest.testCorruptFrameWithBadOpcode EADDRINUSE on linuxX64

Open
#5,463 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
14.5k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
49

Description

## Description
`CIOWebSocketTest.testCorruptFrameWithBadOpcode[linuxX64]` fails with `EADDRINUSE` — port conflict from a previous test not releasing the port in time.

## Impact
Intermittent failure on "Native Linux X64" CI check.

## Affected PRs (sample)
- #5426

## Platforms
- Native Linux X64 (linuxX64)

## Suggested investigation
- Add a small delay or use dynamic port allocation (port 0) to avoid port conflicts between tests
- Ensure `ServerSocket.close()` completes before the next test binds to the same port

Contributor guide

Open the contributing guide

Research direction

Start by locating CIOWebSocketTest.testCorruptFrameWithBadOpcode and reproduce it on the Native Linux X64 CI target. Inspect how the test binds and closes its ServerSocket, then verify that repeated runs no longer produce EADDRINUSE and that the affected CI check passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
networking, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.