Code Review
/
netconf.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bump odlparent to 4.0.11
[netconf.git]
/
netconf
/
netconf-netty-util
/
src
/
test
/
java
/
org
/
opendaylight
/
netconf
/
nettyutil
/
AbstractNetconfSessionNegotiatorTest.java
diff --git
a/netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiatorTest.java
b/netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiatorTest.java
index 68decb5ac5e246e2fb24dc49e949ca00efd1c652..da75cc16de97c033be0b079b345976f1415b8c80 100644
(file)
--- a/
netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiatorTest.java
+++ b/
netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiatorTest.java
@@
-20,9
+20,11
@@
import static org.opendaylight.netconf.nettyutil.AbstractChannelInitializer.NETC
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
+import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.channel.ChannelOutboundHandlerAdapter;
+import io.netty.channel.ChannelPromise;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.ssl.SslHandler;
import io.netty.util.HashedWheelTimer;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.ssl.SslHandler;
import io.netty.util.HashedWheelTimer;
@@
-107,7
+109,7
@@
public class AbstractNetconfSessionNegotiatorTest {
@Test
public void testStartNegotiationNotEstablished() throws Exception {
@Test
public void testStartNegotiationNotEstablished() throws Exception {
- final ChannelOutboundHandler closedDetector = Mockito.spy(new C
hannelOutboundHandlerAdapte
r());
+ final ChannelOutboundHandler closedDetector = Mockito.spy(new C
loseDetecto
r());
channel.pipeline().addLast("closedDetector", closedDetector);
doReturn(false).when(promise).isDone();
doReturn(false).when(promise).isCancelled();
channel.pipeline().addLast("closedDetector", closedDetector);
doReturn(false).when(promise).isDone();
doReturn(false).when(promise).isCancelled();
@@
-161,4
+163,11
@@
public class AbstractNetconfSessionNegotiatorTest {
channel.pipeline().fireExceptionCaught(cause);
verify(promise).setFailure(cause);
}
channel.pipeline().fireExceptionCaught(cause);
verify(promise).setFailure(cause);
}
+
+ private static class CloseDetector extends ChannelOutboundHandlerAdapter {
+ @Override
+ public void close(ChannelHandlerContext ctx, ChannelPromise promise) {
+ // Override needed so @Skip from superclass is not effective
+ }
+ }
}
}