Skip to content

Commit

Permalink
Call correct super methods in test.
Browse files Browse the repository at this point in the history
Motivation:

We called the wrong super method in the test and also had a few unused imports.

Modifications:

Fix super method call and cleanup.

Result:

More correct test and cleanup.
  • Loading branch information
normanmaurer committed Feb 27, 2018
1 parent 06dcca1 commit a53f716
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public final void channelActive(ChannelHandlerContext ctx) throws Exception {
if (!autoRead) {
ctx.read();
}
super.channelInactive(ctx);
super.channelActive(ctx);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.spdy.SpdyFrameCodec;
import io.netty.handler.codec.spdy.SpdyVersion;
import io.netty.util.NetUtil;
import org.junit.Test;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Random;
import java.util.concurrent.atomic.AtomicReference;

Expand Down Expand Up @@ -195,7 +193,6 @@ public void initChannel(SocketChannel channel) throws Exception {
cb.handler(ch);

Channel sc = sb.bind().sync().channel();
int port = ((InetSocketAddress) sc.localAddress()).getPort();

Channel cc = cb.connect(sc.localAddress()).sync().channel();
cc.writeAndFlush(frames);
Expand Down

0 comments on commit a53f716

Please sign in to comment.