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