Increaes timeout on Netty handshake tests

This commit increases the timeout on the Netty handshake tests because
the previous value could cause timeout exceptions on slow machines.
This commit is contained in:
Jason Tedor 2016-05-09 19:02:54 -04:00
parent fdae97a2b5
commit eed5b0be4f
1 changed files with 7 additions and 4 deletions

View File

@ -45,7 +45,9 @@ import static java.util.Collections.emptySet;
import static org.hamcrest.Matchers.containsString;
public class NettyTransportServiceHandshakeTests extends ESTestCase {
private static ThreadPool threadPool;
private static final long timeout = Long.MAX_VALUE;
@BeforeClass
public static void startThreadPool() {
@ -116,7 +118,7 @@ public class NettyTransportServiceHandshakeTests extends ESTestCase {
emptyMap(),
emptySet(),
Version.CURRENT.minimumCompatibilityVersion()),
100);
timeout);
assertNotNull(connectedNode);
// the name and version should be updated
@ -138,7 +140,7 @@ public class NettyTransportServiceHandshakeTests extends ESTestCase {
emptyMap(),
emptySet(),
Version.CURRENT.minimumCompatibilityVersion()),
100);
timeout);
fail("expected handshake to fail from mismatched cluster names");
} catch (ConnectTransportException e) {
assertThat(e.getMessage(), containsString("handshake failed, mismatched cluster name [Cluster [b]]"));
@ -161,7 +163,7 @@ public class NettyTransportServiceHandshakeTests extends ESTestCase {
emptyMap(),
emptySet(),
Version.CURRENT.minimumCompatibilityVersion()),
100);
timeout);
fail("expected handshake to fail from incompatible versions");
} catch (ConnectTransportException e) {
assertThat(e.getMessage(), containsString("handshake failed, incompatible version"));
@ -187,7 +189,7 @@ public class NettyTransportServiceHandshakeTests extends ESTestCase {
emptyMap(),
emptySet(),
Version.CURRENT.minimumCompatibilityVersion()),
100,
timeout,
false);
assertNotNull(connectedNode);
assertEquals(connectedNode.getName(), "TS_B");
@ -203,4 +205,5 @@ public class NettyTransportServiceHandshakeTests extends ESTestCase {
this.discoveryNode = discoveryNode;
}
}
}