GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 4.1: Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 by netty-project-bot · Pull Request #17708 · netty/netty

Auto-port 4.1: Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 #17708

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.

Sign up for GitHub

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

Merged
normanmaurer merged 1 commit into 4.1 from auto-port-pr-17697-to-4.1
Oct 1, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

Auto-port 4.1: Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 #17708

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
7a2ecb5
Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests…
normanmaurer Oct 1, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests…
… in codec-http2 (#17697)

Motivation:

Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension
afterAll check ("Possible memory leak detected for resource scope")
although every test in the class passed. The check waits up to 5 seconds
for resources to be released, so something stayed open for good rather
than just shutting down slowly.

Several tests run LocalChannel / LocalServerChannel on a
DefaultEventLoop
and then call shutdownGracefully() without waiting. Unlike
LocalIoHandler (and NioIoHandler for the other tests in the class),
DefaultEventLoop does not close the channels registered with it when it
shuts down. A server-side child channel is therefore only closed if the
peer-close task still runs before the loop terminates. If it does not,
the channel and whatever it still holds (for example the large wrapped
payloads written by the auto-read tests added in #17617) is never
released, which the leak presence detector reports.

Modification:

- Use `new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory())`
instead of `new DefaultEventLoop()` in the LocalChannel based tests of
Http2MultiplexTransportTest, Http2MultiplexCodecBuilderTest and
Http2StreamChannelBootstrapTest. LocalIoHandler closes all registered
channels when the group shuts down. A single thread is kept so server
and client still share one event loop as before.

Result:

Channels of the LocalChannel tests are always closed when their event
loop group shuts down, which removes one possible source of the flaky
leak report.

(cherry picked from commit d3817ad)
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer @netty-project-bot
normanmaurer authored and netty-project-bot committed Oct 1, 2026
commit 7a2ecb5abb80b57743dffb678150825e58bc00fd

There are no files selected for viewing

5 changes: 3 additions & 2 deletions 5 codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java
Show comments Show annotations
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.DefaultEventLoop;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultiThreadIoEventLoopGroup;

Check failure on line 30 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 30 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 30 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
import io.netty.channel.local.LocalAddress;
import io.netty.channel.local.LocalChannel;
import io.netty.channel.local.LocalIoHandler;

Check failure on line 33 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 33 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 33 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
import io.netty.channel.local.LocalServerChannel;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
Expand Down Expand Up @@ -62,7 +63,7 @@

@BeforeAll
public static void init() {
group = new DefaultEventLoop();
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol

Check failure on line 66 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
}

@BeforeEach
Expand Down
12 changes: 6 additions & 6 deletions 12 codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java
Show comments Show annotations
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.DefaultEventLoop;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.channel.local.LocalAddress;
import io.netty.channel.local.LocalChannel;
import io.netty.channel.local.LocalIoHandler;

Check failure on line 35 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 35 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 35 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
import io.netty.channel.local.LocalServerChannel;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
Expand Down Expand Up @@ -784,7 +784,7 @@
try {
final CountDownLatch clientReceivedResponseLatch = new CountDownLatch(1);
final CountDownLatch resetFrameLatch = new CountDownLatch(1);
group = new DefaultEventLoop();
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol

Check failure on line 787 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
LocalAddress serverAddress = new LocalAddress(getClass().getName());
ServerBootstrap sb = new ServerBootstrap()
.channel(LocalServerChannel.class)
Expand Down Expand Up @@ -903,8 +903,8 @@
Http2StreamChannel outStream = null;
final AtomicReference<ByteBuf> receivedHolder = new AtomicReference<ByteBuf>();
try {
inGroup = new DefaultEventLoop();
outGroup = new DefaultEventLoop();
inGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());

Check failure on line 906 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 906 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 906 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
outGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());

LocalAddress inAddress = new LocalAddress(getClass().getName() + ".in");
LocalAddress outAddress = new LocalAddress(getClass().getName() + ".out");
Expand Down Expand Up @@ -1099,8 +1099,8 @@
Thread hammer = null;
final AtomicReference<ByteBuf> receivedHolder = new AtomicReference<ByteBuf>();
try {
serverGroup = new DefaultEventLoop();
clientGroup = new DefaultEventLoop();
serverGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
clientGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
LocalAddress serverAddress = new LocalAddress(getClass().getName() + ".torture");

ServerBootstrap sb = new ServerBootstrap();
Expand Down
5 changes: 3 additions & 2 deletions 5 codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java
Show comments Show annotations
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.DefaultEventLoop;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultiThreadIoEventLoopGroup;

Check failure on line 25 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 25 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 25 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
import io.netty.channel.local.LocalAddress;
import io.netty.channel.local.LocalChannel;
import io.netty.channel.local.LocalIoHandler;

Check failure on line 28 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / verify-pr

error: cannot find symbol

Check failure on line 28 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

error: cannot find symbol

Check failure on line 28 in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

error: cannot find symbol
import io.netty.channel.local.LocalServerChannel;
import io.netty.util.concurrent.DefaultPromise;
import io.netty.util.concurrent.EventExecutor;
Expand Down Expand Up @@ -62,7 +63,7 @@
Channel clientChannel = null;
try {
final CountDownLatch serverChannelLatch = new CountDownLatch(1);
group = new DefaultEventLoop();
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
LocalAddress serverAddress = new LocalAddress(getClass().getName());
ServerBootstrap sb = new ServerBootstrap()
.channel(LocalServerChannel.class)
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.