Fix compile error in test introduced by 806dace32d

Motivation:

806dace32d introduce a compilation error due a bad cherry-pick from 4.1

Modifications:

Use correct API for master branch.

Result:

No compile error anymore
This commit is contained in:
Norman Maurer 2019-04-12 14:26:24 +02:00
parent 9ef5c0946a
commit 34d8b62506

View File

@ -16,7 +16,6 @@
package io.netty.channel.socket.nio;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultithreadEventLoopGroup;
import io.netty.channel.nio.NioHandler;
@ -51,10 +50,10 @@ public class NioServerSocketChannelTest extends AbstractNioChannelTest<NioServer
@Test
public void testIsActiveFalseAfterClose() {
NioServerSocketChannel serverSocketChannel = new NioServerSocketChannel();
EventLoopGroup group = new NioEventLoopGroup(1);
EventLoopGroup group = new MultithreadEventLoopGroup(1, NioHandler.newFactory());
NioServerSocketChannel serverSocketChannel = new NioServerSocketChannel(group.next(), group);
try {
group.register(serverSocketChannel).syncUninterruptibly();
serverSocketChannel.register().syncUninterruptibly();
Channel channel = serverSocketChannel.bind(new InetSocketAddress(0)).syncUninterruptibly().channel();
Assert.assertTrue(channel.isActive());
Assert.assertTrue(channel.isOpen());