-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Release buffers in netty test #126744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release buffers in netty test #126744
Conversation
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with optional suggestions
var lastContent = channel.readInbound(); | ||
assertTrue(lastContent instanceof LastHttpContent); | ||
((LastHttpContent) lastContent).release(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, in one line (with slightly nicer failure message too):
var lastContent = channel.readInbound(); | |
assertTrue(lastContent instanceof LastHttpContent); | |
((LastHttpContent) lastContent).release(); | |
asInstanceOf(LastHttpContent.class, channel.readInbound()).release(); |
var fullReq = channel.readInbound(); | ||
assertTrue(fullReq instanceof FullHttpRequest); | ||
((FullHttpRequest) fullReq).release(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
var fullReq = channel.readInbound(); | |
assertTrue(fullReq instanceof FullHttpRequest); | |
((FullHttpRequest) fullReq).release(); | |
asInstanceOf(FullHttpRequest.class, channel.readInbound()).release(); |
This reverts commit f9f3def.
This reverts commit f9f3def.
This reverts commit f9f3def. Revert Netty4HttpHeaderValidatorTests.java
Release leaking buffers in Netty4HttpHeaderValidatorTests.
Closes #126743
Closes #126745
Closes #126749