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 — Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests… · netty/netty@d3817ad

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • codec-http2/src/test/java/io/netty/handler/codec/http2
    • Http2MultiplexCodecBuilderTest.java
    • Http2MultiplexTransportTest.java
    • Http2StreamChannelBootstrapTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java‎

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilderTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
import io.netty.channel.ChannelHandlerContext;
2727
import io.netty.channel.ChannelInboundHandlerAdapter;
2828
import io.netty.channel.ChannelInitializer;
29-
import io.netty.channel.DefaultEventLoop;
3029
import io.netty.channel.EventLoopGroup;
30+
import io.netty.channel.MultiThreadIoEventLoopGroup;
3131
import io.netty.channel.local.LocalAddress;
3232
import io.netty.channel.local.LocalChannel;
33+
import io.netty.channel.local.LocalIoHandler;
3334
import io.netty.channel.local.LocalServerChannel;
3435
import org.junit.jupiter.api.AfterAll;
3536
import org.junit.jupiter.api.AfterEach;
@@ -62,7 +63,7 @@ public class Http2MultiplexCodecBuilderTest {
6263

6364
@BeforeAll
6465
public static void init() {
65-
group = new DefaultEventLoop();
66+
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
6667
}
6768

6869
@BeforeEach
Collapse file

‎codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java‎

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import io.netty.channel.ChannelInitializer;
2929
import io.netty.channel.ChannelOption;
3030
import io.netty.channel.ChannelPipeline;
31-
import io.netty.channel.DefaultEventLoop;
3231
import io.netty.channel.EventLoopGroup;
3332
import io.netty.channel.MultiThreadIoEventLoopGroup;
3433
import io.netty.channel.SimpleChannelInboundHandler;
3534
import io.netty.channel.local.LocalAddress;
3635
import io.netty.channel.local.LocalChannel;
36+
import io.netty.channel.local.LocalIoHandler;
3737
import io.netty.channel.local.LocalServerChannel;
3838
import io.netty.channel.nio.NioIoHandler;
3939
import io.netty.channel.socket.nio.NioServerSocketChannel;
@@ -772,7 +772,7 @@ public void testServerCloseShouldNotSendResetIfClientSentEOS() throws Exception
772772
try {
773773
final CountDownLatch clientReceivedResponseLatch = new CountDownLatch(1);
774774
final CountDownLatch resetFrameLatch = new CountDownLatch(1);
775-
group = new DefaultEventLoop();
775+
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
776776
LocalAddress serverAddress = new LocalAddress(getClass().getName());
777777
ServerBootstrap sb = new ServerBootstrap()
778778
.channel(LocalServerChannel.class)
@@ -891,8 +891,8 @@ public void proxyMirroringWritabilityToAutoReadAcrossEventLoopsDoesNotStallStrea
891891
Http2StreamChannel outStream = null;
892892
final AtomicReference<ByteBuf> receivedHolder = new AtomicReference<ByteBuf>();
893893
try {
894-
inGroup = new DefaultEventLoop();
895-
outGroup = new DefaultEventLoop();
894+
inGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
895+
outGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
896896

897897
LocalAddress inAddress = new LocalAddress(getClass().getName() + ".in");
898898
LocalAddress outAddress = new LocalAddress(getClass().getName() + ".out");
@@ -1087,8 +1087,8 @@ public void tortureCrossThreadSetAutoReadRace() throws Exception {
10871087
Thread hammer = null;
10881088
final AtomicReference<ByteBuf> receivedHolder = new AtomicReference<ByteBuf>();
10891089
try {
1090-
serverGroup = new DefaultEventLoop();
1091-
clientGroup = new DefaultEventLoop();
1090+
serverGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
1091+
clientGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
10921092
LocalAddress serverAddress = new LocalAddress(getClass().getName() + ".torture");
10931093

10941094
ServerBootstrap sb = new ServerBootstrap();
Collapse file

‎codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java‎

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrapTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
import io.netty.channel.ChannelHandler;
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInitializer;
24-
import io.netty.channel.DefaultEventLoop;
2524
import io.netty.channel.EventLoopGroup;
25+
import io.netty.channel.MultiThreadIoEventLoopGroup;
2626
import io.netty.channel.local.LocalAddress;
2727
import io.netty.channel.local.LocalChannel;
28+
import io.netty.channel.local.LocalIoHandler;
2829
import io.netty.channel.local.LocalServerChannel;
2930
import io.netty.util.concurrent.DefaultPromise;
3031
import io.netty.util.concurrent.EventExecutor;
@@ -62,7 +63,7 @@ public void testStreamIsNotCreatedIfParentConnectionIsClosedConcurrently() throw
6263
Channel clientChannel = null;
6364
try {
6465
final CountDownLatch serverChannelLatch = new CountDownLatch(1);
65-
group = new DefaultEventLoop();
66+
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
6667
LocalAddress serverAddress = new LocalAddress(getClass().getName());
6768
ServerBootstrap sb = new ServerBootstrap()
6869
.channel(LocalServerChannel.class)

0 commit comments

Comments
0 (0)
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.