Fix TcpDiscoveryCoordinatorFailureTest.testClusterFailedNewCoordinatorInitialized()
@@ -36,6 +36,7 @@ import org.apache.ignite.spi.IgniteSpiOperationTimeoutException;
import org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage;
+import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryConnectionCheckMessage;
import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -88,6 +89,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
return cfg;
}
+ /** */
+ @Override protected long getTestTimeout() {
+ return 70_000;
+ }
+
/**
*
*/
@@ -280,8 +286,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
byte[] data,
long timeout
) throws IOException {
- if (isDrop(msg))
- return;
+ if (isDrop(msg)) {
+ // Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
+ // connRecoveryTimeout.
+ msg = new TcpDiscoveryConnectionCheckMessage(locNode);
+ }
super.writeToSocket(sock, msg, data, timeout);
}
@@ -292,8 +301,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
TcpDiscoveryAbstractMessage msg,
long timeout
) throws IOException, IgniteCheckedException {
- if (isDrop(msg))
- return;
+ if (isDrop(msg)) {
+ // Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
+ // connRecoveryTimeout.
+ msg = new TcpDiscoveryConnectionCheckMessage(locNode);
+ }
super.writeToSocket(sock, msg, timeout);
}
@@ -306,8 +318,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
TcpDiscoveryAbstractMessage msg,
long timeout
) throws IOException, IgniteCheckedException {
- if (isDrop(msg))
- return;
+ if (isDrop(msg)) {
+ // Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
+ // connRecoveryTimeout.
+ msg = new TcpDiscoveryConnectionCheckMessage(locNode);
+ }
super.writeToSocket(node, sock, out, msg, timeout);
}
@@ -319,8 +334,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
TcpDiscoveryAbstractMessage msg,
long timeout
) throws IOException, IgniteCheckedException {
- if (isDrop(msg))
- return;
+ if (isDrop(msg)) {
+ // Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
+ // connRecoveryTimeout.
+ msg = new TcpDiscoveryConnectionCheckMessage(locNode);
+ }
super.writeToSocket(sock, out, msg, timeout);
}
@@ -332,8 +350,11 @@ public class TcpDiscoveryCoordinatorFailureTest extends GridCommonAbstractTest {
int res,
long timeout
) throws IOException {
- if (isDrop(msg))
- return;
+ if (isDrop(msg)) {
+ // Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
+ // connRecoveryTimeout.
+ msg = new TcpDiscoveryConnectionCheckMessage(locNode);
+ }
super.writeToSocket(msg, sock, res, timeout);
}
