Skip to content

Improve flaky NioSocketChannelTest#16679

Merged
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-flaky-niochannel
Apr 22, 2026
Merged

Improve flaky NioSocketChannelTest#16679
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-flaky-niochannel

Conversation

@chrisvest

Copy link
Copy Markdown
Member

Motivation:
We've seen IllegalReferenceCountException from this test. This is probably not the root cause, but the root looks like it is lost in the pipeline.

Modification:

  • Increase the test timeouts.
  • Add sync() calls so we make sure to wait for the event loop shutdowns to complete, before we close the scope of the LeakPresenceDetector.
  • Change an assertNotSame call in a future listener (which runs on the event loop) with code that captures the error and funnels it out to the test code through a future.

Result:
More debuggable test, maybe more stable too.

Motivation:
We've seen IllegalReferenceCountException from this test.
This is probably not the root cause, but the root looks like it is lost in the pipeline.

Modification:
- Increase the test timeouts.
- Add sync() calls so we make sure to wait for the event loop shutdowns to complete, before we close the scope of the LeakPresenceDetector.
- Change an assertNotSame call in a future listener (which runs on the event loop) with code that captures the error and funnels it out to the test code through a future.

Result:
More debuggable test, maybe more stable too.
@chrisvest chrisvest added this to the 4.2.13.Final milestone Apr 21, 2026
@chrisvest chrisvest requested a review from normanmaurer April 21, 2026 20:57
@chrisvest chrisvest added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Apr 21, 2026
@normanmaurer normanmaurer merged commit 82a1f0e into netty:4.2 Apr 22, 2026
23 checks passed
@netty-project-bot

Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 4.1.

@netty-project-bot

Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 5.0.

@normanmaurer

Copy link
Copy Markdown
Member

Port for 4.1 #16681

@chrisvest chrisvest deleted the 4.2-flaky-niochannel branch April 22, 2026 15:20
@chrisvest

Copy link
Copy Markdown
Member Author

5.0 port #16684

@chrisvest chrisvest removed needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Apr 22, 2026
normanmaurer added a commit that referenced this pull request Apr 23, 2026
Motivation:
We've seen IllegalReferenceCountException from this test. This is
probably not the root cause, but the root looks like it is lost in the
pipeline.

Modification:
- Increase the test timeouts.
- Add sync() calls so we make sure to wait for the event loop shutdowns
to complete, before we close the scope of the LeakPresenceDetector.
- Change an assertNotSame call in a future listener (which runs on the
event loop) with code that captures the error and funnels it out to the
test code through a future.

Result:
More debuggable test, maybe more stable too.

---------

Co-authored-by: Chris Vest <christianvest_hansen@apple.com>
normanmaurer pushed a commit that referenced this pull request Apr 23, 2026
Motivation:
5.0 port of #16679

Modification:
- Increase the test timeouts.
- Add sync() calls so we make sure to wait for the event loop shutdowns
to complete, before we close the scope of the LeakPresenceDetector.

Result:
More debuggable test, maybe more stable too.

(cherry picked from commit 82a1f0e)
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