GeezerVison is showing github.com — Use correct bootstrap · netty/netty@78dbdc7
File tree
Expand file treeCollapse file tree
Open diff view settings
transport-native-epoll/src/test/java/io/netty/channel/epoll
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketTcpMd5Test.java +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
16 | 16 | package io.netty.channel.epoll; |
17 | 17 |
|
18 | 18 | import io.netty.bootstrap.Bootstrap; |
| 19 | +import io.netty.bootstrap.ServerBootstrap; |
19 | 20 | import io.netty.channel.ChannelException; |
20 | 21 | import io.netty.channel.ChannelInboundHandlerAdapter; |
21 | 22 | import io.netty.channel.ChannelOption; |
@@ -56,10 +57,10 @@ public static void afterClass() { |
56 | 57 |
|
57 | 58 | @BeforeEach |
58 | 59 | public void setup() { |
59 | | - Bootstrap bootstrap = new Bootstrap(); |
| 60 | + ServerBootstrap bootstrap = new ServerBootstrap(); |
60 | 61 | server = (EpollServerSocketChannel) bootstrap.group(GROUP) |
61 | 62 | .channel(EpollServerSocketChannel.class) |
62 | | - .handler(new ChannelInboundHandlerAdapter()) |
| 63 | + .childHandler(new ChannelInboundHandlerAdapter()) |
63 | 64 | .bind(new InetSocketAddress(NetUtil.LOCALHOST4, 0)).syncUninterruptibly().channel(); |
64 | 65 | } |
65 | 66 |
|
@@ -90,7 +91,7 @@ private static void handleException(ChannelException ce) { |
90 | 91 |
|
91 | 92 | @Test |
92 | 93 | public void testServerOption() throws Exception { |
93 | | - Bootstrap bootstrap = new Bootstrap(); |
| 94 | + ServerBootstrap bootstrap = new ServerBootstrap(); |
94 | 95 | EpollServerSocketChannel ch = (EpollServerSocketChannel) bootstrap.group(GROUP) |
95 | 96 | .channel(EpollServerSocketChannel.class) |
96 | 97 | .handler(new ChannelInboundHandlerAdapter()) |
|