diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java index 1c3ebf5e7e..5ac6b3fbf9 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java @@ -85,7 +85,7 @@ public class SocketSslEchoTest extends AbstractSocketTest { this.useCompositeByteBuf = useCompositeByteBuf; } - @Test + @Test(timeout = 30000) public void testSslEcho() throws Throwable { run(); } @@ -94,7 +94,7 @@ public class SocketSslEchoTest extends AbstractSocketTest { testSslEcho(sb, cb, true); } - @Test + @Test(timeout = 30000) public void testSslEchoNotAutoRead() throws Throwable { run(); } diff --git a/transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTestUtils.java b/transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTestUtils.java index e2ba895693..6d09d425df 100644 --- a/transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTestUtils.java +++ b/transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTestUtils.java @@ -18,24 +18,35 @@ package io.netty.channel.epoll; import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.util.concurrent.DefaultThreadFactory; import java.util.Collections; import java.util.List; final class EpollTestUtils { - private static final EventLoopGroup GROUP = new EpollEventLoopGroup(); + + private static final int BOSSES = 2; + private static final int WORKERS = 3; + + private static final EventLoopGroup epollBossGroup = + new NioEventLoopGroup(BOSSES, new DefaultThreadFactory("testsuite-epoll-boss", true)); + private static final EventLoopGroup epollWorkerGroup = + new NioEventLoopGroup(WORKERS, new DefaultThreadFactory("testsuite-epoll-worker", true)); + static List> newFactories() { return Collections.>singletonList( new TestsuitePermutation.BootstrapComboFactory() { @Override public ServerBootstrap newServerInstance() { - return new ServerBootstrap().group(GROUP).channel(EpollServerSocketChannel.class); + return new ServerBootstrap().group( + epollBossGroup, epollWorkerGroup).channel(EpollServerSocketChannel.class); } @Override public Bootstrap newClientInstance() { - return new Bootstrap().group(GROUP).channel(EpollSocketChannel.class); + return new Bootstrap().group(epollWorkerGroup).channel(EpollSocketChannel.class); } }); }