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 — Replace usage of DefaultEventLoopGroup (#15904) · netty/netty@121e5ca

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • codec-haproxy/src/test/java/io/netty/handler/codec/haproxy
    • HAProxyIntegrationTest.java
  • codec-http2/src/test/java/io/netty/handler/codec/http2
    • Http2ConnectionRoundtripTest.java
    • HttpToHttp2ConnectionHandlerTest.java
    • InboundHttp2ToHttpAdapterTest.java
  • handler-proxy/src/test/java/io/netty/handler/proxy
    • HttpProxyHandlerTest.java
  • handler-ssl-ocsp/src/test/java/io/netty/handler/ssl/ocsp
    • OcspTest.java
  • handler/src/test/java/io/netty/handler
    • address
      • ResolveAddressHandlerTest.java
    • ssl
      • CipherSuiteCanaryTest.java
      • OpenSslPrivateKeyMethodTest.java
      • SniClientJava8TestUtil.java
      • SniClientTest.java
      • SslHandlerTest.java
  • resolver-dns/src/test/java/io/netty/resolver/dns
    • DefaultAuthoritativeDnsServerCacheTest.java
    • DefaultDnsCnameCacheTest.java
    • DnsAddressResolverGroupTest.java
  • transport/src/test/java/io/netty
    • bootstrap
      • BootstrapTest.java
    • channel
      • BaseChannelTest.java
      • ChannelInitializerTest.java
      • DefaultChannelPipelineTailTest.java
      • DefaultChannelPipelineTest.java
      • local
        • LocalChannelTest.java
        • LocalTransportThreadModelTest2.java
      • pool
        • FixedChannelPoolTest.java
        • SimpleChannelPoolTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyIntegrationTest.java‎

Copy file name to clipboardExpand all lines: codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyIntegrationTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import io.netty.channel.Channel;
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInitializer;
24-
import io.netty.channel.DefaultEventLoopGroup;
2524
import io.netty.channel.EventLoopGroup;
25+
import io.netty.channel.MultiThreadIoEventLoopGroup;
2626
import io.netty.channel.SimpleChannelInboundHandler;
2727
import io.netty.channel.local.LocalAddress;
2828
import io.netty.channel.local.LocalChannel;
29+
import io.netty.channel.local.LocalIoHandler;
2930
import io.netty.channel.local.LocalServerChannel;
3031
import org.junit.jupiter.api.Test;
3132

@@ -44,7 +45,7 @@ public void testBasicCase() throws Exception {
4445
final AtomicReference<HAProxyMessage> msgHolder = new AtomicReference<HAProxyMessage>();
4546
LocalAddress localAddress = new LocalAddress("HAProxyIntegrationTest");
4647

47-
EventLoopGroup group = new DefaultEventLoopGroup();
48+
EventLoopGroup group = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
4849
ServerBootstrap sb = new ServerBootstrap();
4950
sb.channel(LocalServerChannel.class)
5051
.group(group)
Collapse file

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

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
import io.netty.channel.ChannelOutboundHandlerAdapter;
3030
import io.netty.channel.ChannelPipeline;
3131
import io.netty.channel.ChannelPromise;
32-
import io.netty.channel.DefaultEventLoopGroup;
32+
import io.netty.channel.MultiThreadIoEventLoopGroup;
3333
import io.netty.channel.local.LocalAddress;
3434
import io.netty.channel.local.LocalChannel;
35+
import io.netty.channel.local.LocalIoHandler;
3536
import io.netty.channel.local.LocalServerChannel;
3637
import io.netty.handler.codec.http2.Http2TestUtil.FrameCountDown;
3738
import io.netty.handler.codec.http2.Http2TestUtil.Http2Runnable;
@@ -1194,7 +1195,7 @@ private void bootstrapEnv(int dataCountDown, int settingsAckCount,
11941195

11951196
final AtomicReference<Http2ConnectionHandler> serverHandlerRef = new AtomicReference<Http2ConnectionHandler>();
11961197
final CountDownLatch serverInitLatch = new CountDownLatch(1);
1197-
sb.group(new DefaultEventLoopGroup());
1198+
sb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
11981199
sb.channel(LocalServerChannel.class);
11991200
sb.childHandler(new ChannelInitializer<Channel>() {
12001201
@Override
@@ -1214,7 +1215,7 @@ protected void initChannel(Channel ch) throws Exception {
12141215
}
12151216
});
12161217

1217-
cb.group(new DefaultEventLoopGroup());
1218+
cb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
12181219
cb.channel(LocalChannel.class);
12191220
cb.handler(new ChannelInitializer<Channel>() {
12201221
@Override
Collapse file

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

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/HttpToHttp2ConnectionHandlerTest.java
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
import io.netty.channel.ChannelInitializer;
2626
import io.netty.channel.ChannelPipeline;
2727
import io.netty.channel.ChannelPromise;
28-
import io.netty.channel.DefaultEventLoopGroup;
28+
import io.netty.channel.MultiThreadIoEventLoopGroup;
2929
import io.netty.channel.local.LocalAddress;
3030
import io.netty.channel.local.LocalChannel;
31+
import io.netty.channel.local.LocalIoHandler;
3132
import io.netty.channel.local.LocalServerChannel;
3233
import io.netty.handler.codec.http.DefaultFullHttpRequest;
3334
import io.netty.handler.codec.http.DefaultHttpContent;
@@ -557,7 +558,7 @@ private void bootstrapEnv(int requestCountDown, int serverSettingsAckCount, int
557558
sb = new ServerBootstrap();
558559
cb = new Bootstrap();
559560

560-
sb.group(new DefaultEventLoopGroup());
561+
sb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
561562
sb.channel(LocalServerChannel.class);
562563
sb.childHandler(new ChannelInitializer<Channel>() {
563564
@Override
@@ -575,7 +576,7 @@ protected void initChannel(Channel ch) throws Exception {
575576
}
576577
});
577578

578-
cb.group(new DefaultEventLoopGroup());
579+
cb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
579580
cb.channel(LocalChannel.class);
580581
cb.handler(new ChannelInitializer<Channel>() {
581582
@Override
Collapse file

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

Copy file name to clipboardExpand all lines: codec-http2/src/test/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapterTest.java
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
import io.netty.channel.ChannelInitializer;
2727
import io.netty.channel.ChannelPipeline;
2828
import io.netty.channel.ChannelPromise;
29-
import io.netty.channel.DefaultEventLoopGroup;
29+
import io.netty.channel.MultiThreadIoEventLoopGroup;
3030
import io.netty.channel.SimpleChannelInboundHandler;
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 io.netty.handler.codec.http.DefaultFullHttpRequest;
3536
import io.netty.handler.codec.http.DefaultFullHttpResponse;
@@ -669,7 +670,7 @@ private void boostrapEnv(int clientLatchCount, int clientLatchCount2, int server
669670
sb = new ServerBootstrap();
670671
cb = new Bootstrap();
671672

672-
sb.group(new DefaultEventLoopGroup());
673+
sb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
673674
sb.channel(LocalServerChannel.class);
674675
sb.childHandler(new ChannelInitializer<Channel>() {
675676
@Override
@@ -697,7 +698,7 @@ protected void initChannel(Channel ch) throws Exception {
697698
}
698699
});
699700

700-
cb.group(new DefaultEventLoopGroup());
701+
cb.group(new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()));
701702
cb.channel(LocalChannel.class);
702703
cb.handler(new ChannelInitializer<Channel>() {
703704
@Override
Collapse file

‎handler-proxy/src/test/java/io/netty/handler/proxy/HttpProxyHandlerTest.java‎

Copy file name to clipboardExpand all lines: handler-proxy/src/test/java/io/netty/handler/proxy/HttpProxyHandlerTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
import io.netty.channel.ChannelInboundHandlerAdapter;
2424
import io.netty.channel.ChannelInitializer;
2525
import io.netty.channel.ChannelPromise;
26-
import io.netty.channel.DefaultEventLoopGroup;
2726
import io.netty.channel.EventLoopGroup;
27+
import io.netty.channel.MultiThreadIoEventLoopGroup;
2828
import io.netty.channel.embedded.EmbeddedChannel;
2929
import io.netty.channel.local.LocalAddress;
3030
import io.netty.channel.local.LocalChannel;
31+
import io.netty.channel.local.LocalIoHandler;
3132
import io.netty.channel.local.LocalServerChannel;
3233
import io.netty.handler.codec.http.DefaultFullHttpResponse;
3334
import io.netty.handler.codec.http.DefaultHttpHeaders;
@@ -181,7 +182,7 @@ public void testExceptionDuringConnect() throws Exception {
181182
Channel serverChannel = null;
182183
Channel clientChannel = null;
183184
try {
184-
group = new DefaultEventLoopGroup(1);
185+
group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
185186
final LocalAddress addr = new LocalAddress("a");
186187
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
187188
ChannelFuture sf =
Collapse file

‎handler-ssl-ocsp/src/test/java/io/netty/handler/ssl/ocsp/OcspTest.java‎

Copy file name to clipboardExpand all lines: handler-ssl-ocsp/src/test/java/io/netty/handler/ssl/ocsp/OcspTest.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.ChannelInboundHandlerAdapter;
2727
import io.netty.channel.ChannelInitializer;
2828
import io.netty.channel.ChannelPipeline;
29-
import io.netty.channel.DefaultEventLoopGroup;
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 io.netty.handler.ssl.OpenSsl;
3536
import io.netty.handler.ssl.ReferenceCountedOpenSslEngine;
@@ -370,7 +371,7 @@ private static void handshake(SslProvider sslProvider, CountDownLatch latch, Cha
370371
.build();
371372

372373
try {
373-
EventLoopGroup group = new DefaultEventLoopGroup();
374+
EventLoopGroup group = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
374375
try {
375376
LocalAddress address = new LocalAddress("handshake-" + Math.random());
376377
Channel server = newServer(group, address, serverSslContext, response, serverHandler);
Collapse file

‎handler/src/test/java/io/netty/handler/address/ResolveAddressHandlerTest.java‎

Copy file name to clipboardExpand all lines: handler/src/test/java/io/netty/handler/address/ResolveAddressHandlerTest.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.ChannelFuture;
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInboundHandlerAdapter;
24-
import io.netty.channel.DefaultEventLoopGroup;
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.resolver.AbstractAddressResolver;
3031
import io.netty.resolver.AddressResolver;
@@ -55,7 +56,7 @@ public class ResolveAddressHandlerTest {
5556

5657
@BeforeAll
5758
public static void createEventLoop() {
58-
group = new DefaultEventLoopGroup();
59+
group = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
5960
}
6061

6162
@AfterAll
Collapse file

‎handler/src/test/java/io/netty/handler/ssl/CipherSuiteCanaryTest.java‎

Copy file name to clipboardExpand all lines: handler/src/test/java/io/netty/handler/ssl/CipherSuiteCanaryTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
import io.netty.channel.ChannelHandlerContext;
2626
import io.netty.channel.ChannelInitializer;
2727
import io.netty.channel.ChannelPipeline;
28-
import io.netty.channel.DefaultEventLoopGroup;
2928
import io.netty.channel.EventLoopGroup;
29+
import io.netty.channel.MultiThreadIoEventLoopGroup;
3030
import io.netty.channel.SimpleChannelInboundHandler;
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 io.netty.handler.ssl.util.InsecureTrustManagerFactory;
3536
import io.netty.pkitesting.CertificateBuilder;
@@ -77,7 +78,7 @@ static Collection<Object[]> parameters() {
7778

7879
@BeforeAll
7980
public static void init() throws Exception {
80-
GROUP = new DefaultEventLoopGroup();
81+
GROUP = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
8182
CERT = new CertificateBuilder()
8283
.rsa2048()
8384
.subject("cn=localhost")
Collapse file

‎handler/src/test/java/io/netty/handler/ssl/OpenSslPrivateKeyMethodTest.java‎

Copy file name to clipboardExpand all lines: handler/src/test/java/io/netty/handler/ssl/OpenSslPrivateKeyMethodTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
import io.netty.channel.ChannelHandlerContext;
2626
import io.netty.channel.ChannelInitializer;
2727
import io.netty.channel.ChannelPipeline;
28-
import io.netty.channel.DefaultEventLoopGroup;
2928
import io.netty.channel.EventLoopGroup;
29+
import io.netty.channel.MultiThreadIoEventLoopGroup;
3030
import io.netty.channel.SimpleChannelInboundHandler;
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 io.netty.handler.ssl.util.InsecureTrustManagerFactory;
3536
import io.netty.pkitesting.CertificateBuilder;
@@ -98,7 +99,7 @@ public static void init() throws Exception {
9899
assumeCipherAvailable(SslProvider.OPENSSL);
99100
assumeCipherAvailable(SslProvider.JDK);
100101

101-
GROUP = new DefaultEventLoopGroup();
102+
GROUP = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
102103
CERT = new CertificateBuilder()
103104
.rsa2048()
104105
.subject("cn=localhost")
Collapse file

‎handler/src/test/java/io/netty/handler/ssl/SniClientJava8TestUtil.java‎

Copy file name to clipboardExpand all lines: handler/src/test/java/io/netty/handler/ssl/SniClientJava8TestUtil.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInboundHandlerAdapter;
2424
import io.netty.channel.ChannelInitializer;
25-
import io.netty.channel.DefaultEventLoopGroup;
2625
import io.netty.channel.EventLoopGroup;
26+
import io.netty.channel.MultiThreadIoEventLoopGroup;
2727
import io.netty.channel.local.LocalAddress;
2828
import io.netty.channel.local.LocalChannel;
29+
import io.netty.channel.local.LocalIoHandler;
2930
import io.netty.channel.local.LocalServerChannel;
3031
import io.netty.handler.ssl.util.CachedSelfSignedCertificate;
3132
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
@@ -83,7 +84,7 @@ static void testSniClient(SslProvider sslClientProvider, SslProvider sslServerPr
8384
final String sniHost = "sni.netty.io";
8485
SelfSignedCertificate cert = CachedSelfSignedCertificate.getCachedCertificate();
8586
LocalAddress address = new LocalAddress("test");
86-
EventLoopGroup group = new DefaultEventLoopGroup(1);
87+
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
8788
SslContext sslServerContext = null;
8889
SslContext sslClientContext = null;
8990

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.