X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fcommons%2Fprotocol-framework%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fframework%2FServerTest.java;h=6c4af0186f911a672902a2e7ad941d5791b95938;hp=63026e384c498ce12dca810c94886f9a562215d8;hb=5a9588f96084e84c7faf93788ee02f2e00849f8b;hpb=475d28f717bae92b2cc10b0589131771fcc62242 diff --git a/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/ServerTest.java b/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/ServerTest.java index 63026e384c..6c4af0186f 100644 --- a/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/ServerTest.java +++ b/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/ServerTest.java @@ -251,7 +251,7 @@ public class ServerTest { } @Test - public void testNegotiationFailedNoReconnect() throws Exception { + public void testNegotiationFailedReconnect() throws Exception { final Promise p = new DefaultPromise<>(GlobalEventExecutor.INSTANCE); this.dispatcher = getServerDispatcher(p); @@ -292,8 +292,8 @@ public class ServerTest { }); - // Only one strategy should be created for initial connect, no more = no reconnects - verify(reconnectStrategyFactory, times(1)).createReconnectStrategy(); + // Reconnect strategy should be consulted at least twice, for initial connect and reconnect attempts after drop + verify(reconnectStrategyFactory, timeout((int) TimeUnit.MINUTES.toMillis(3)).atLeast(2)).createReconnectStrategy(); } private SimpleDispatcher getClientDispatcher() {