Increase the timeout of ChannelDeregistrationTest
Motivation: When a thread-local random is used first time, it tries to get the initial seed uniquifier from SecureRandom, and it sometimes takes time for the system to have enough entropy. In ChannelDeregistrationTest, the retrieval of the initial seed uniquifier takes place lazily when a new channel is created, and it blocks the channel creation for more than 2 seconds, resulting in test timeouts. Modifications: Increase the timeout of the tests to 5 seconds, because the timeout of the initial seed uniquifier retrieval is 3 seconds. Result: Less flakey tests
This commit is contained in:
parent
605c79ca59
commit
0dc046ebed
@ -73,7 +73,7 @@ public class ChannelDeregistrationTest {
|
||||
* It's important to make sure that they are preserved during and after
|
||||
* {@linkplain io.netty.channel.Channel#deregister()}.
|
||||
*/
|
||||
@Test(timeout = 2000)
|
||||
@Test(timeout = 5000)
|
||||
public void testDeregisterFromDifferentEventExecutorGroup() throws Exception {
|
||||
final AtomicBoolean handlerExecuted1 = new AtomicBoolean();
|
||||
final AtomicBoolean handlerExecuted2 = new AtomicBoolean();
|
||||
@ -128,7 +128,7 @@ public class ChannelDeregistrationTest {
|
||||
* Make sure the {@link EventLoop} and {@link ChannelHandlerInvoker} accessible from within a
|
||||
* {@link ChannelHandler} are wrapped by a {@link PausableEventExecutor}.
|
||||
*/
|
||||
@Test(timeout = 2000)
|
||||
@Test(timeout = 5000)
|
||||
public void testWrappedEventLoop() throws Exception {
|
||||
final AtomicBoolean channelActiveCalled1 = new AtomicBoolean();
|
||||
final AtomicBoolean channelActiveCalled2 = new AtomicBoolean();
|
||||
@ -205,7 +205,7 @@ public class ChannelDeregistrationTest {
|
||||
/**
|
||||
* See https://github.com/netty/netty/issues/2814
|
||||
*/
|
||||
@Test(timeout = 1000)
|
||||
@Test(timeout = 5000)
|
||||
public void testPromise() {
|
||||
ChannelHandler handler = new TestChannelHandler1();
|
||||
AbstractChannel ch = new EmbeddedChannel(handler);
|
||||
|
Loading…
x
Reference in New Issue
Block a user