GeezerVison is showing github.com — Improve flaky NioSocketChannelTest (#16679) (#16684) · netty/netty@2048dca
File tree
Expand file treeCollapse file tree
Open diff view settings
transport/src/test/java/io/netty/channel/socket/nio
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: transport/src/test/java/io/netty/channel/socket/nio/NioSocketChannelTest.java +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -161,7 +161,7 @@ public void channelActive(final ChannelHandlerContext ctx) throws Exception { |
161 | 161 |
|
162 | 162 | // Test for https://github.com/netty/netty/issues/4805 |
163 | 163 | @Test |
164 | | - @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS) |
| 164 | + @Timeout(30) |
165 | 165 | public void testChannelReRegisterReadSameEventLoop() throws Exception { |
166 | 166 | testChannelReRegisterRead(); |
167 | 167 | } |
@@ -221,12 +221,12 @@ public void channelActive(final ChannelHandlerContext ctx) throws Exception { |
221 | 221 | if (sc != null) { |
222 | 222 | sc.close(); |
223 | 223 | } |
224 | | - group.shutdownGracefully(); |
| 224 | + group.shutdownGracefully().sync(); |
225 | 225 | } |
226 | 226 | } |
227 | 227 |
|
228 | 228 | @Test |
229 | | - @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS) |
| 229 | + @Timeout(30) |
230 | 230 | public void testShutdownOutputAndClose() throws Exception { |
231 | 231 | EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()); |
232 | 232 | ServerSocket socket = new ServerSocket(); |
@@ -256,7 +256,7 @@ public void testShutdownOutputAndClose() throws Exception { |
256 | 256 | } catch (IOException ignore) { |
257 | 257 | // ignore |
258 | 258 | } |
259 | | - group.shutdownGracefully(); |
| 259 | + group.shutdownGracefully().sync(); |
260 | 260 | } |
261 | 261 | } |
262 | 262 |
|
|