Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public void testClientNodeSharedIpFinderFailure() throws Exception {
public void testClientNodeStaticIpFinderFailure() throws Exception {
dynamicIpFinder.setAddresses(Collections.singleton("127.0.0.1:47500"));
dynamicIpFinder.setShared(false);

runClientNodeIpFinderFailureTest(TcpDiscoverySpi.DFLT_RECONNECT_DELAY);
}

Expand Down Expand Up @@ -116,9 +117,11 @@ private void runClientNodeIpFinderFailureTest(long reconnectDelay) throws Except

IgniteConfiguration cfgSrv = getConfigurationDynamicIpFinder("Server", false);

long netTimeout = 4000;

TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
discoverySpi.setJoinTimeout(10000);
discoverySpi.setNetworkTimeout(4000);
discoverySpi.setNetworkTimeout(netTimeout);
discoverySpi.setReconnectDelay((int)reconnectDelay);
discoverySpi.setIpFinder(dynamicIpFinder);

Expand All @@ -143,7 +146,8 @@ private void runClientNodeIpFinderFailureTest(long reconnectDelay) throws Except
return true;
}, EVT_CLIENT_NODE_DISCONNECTED);

assertTrue("Failed to wait for client node disconnected.", latch.await(6, SECONDS));
assertTrue("Failed to wait for client node disconnected.",
latch.await(2 * Math.max(reconnectDelay, netTimeout) / 1000, SECONDS));
}

/**
Expand Down
Loading