This is an automated email from the ASF dual-hosted git repository. av pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new 1cbcd0d IGNITE-13282 : Fix TcpDiscoveryCoordinatorFailureTest.testClusterFailedNewCoordinatorInitialized() (#8073) 1cbcd0d is described below commit 1cbcd0d64347a976e22c6ead2f2898077cb1f1bc Author: Vladsz83 <vlads...@gmail.com> AuthorDate: Fri Jul 31 12:15:24 2020 +0300 IGNITE-13282 : Fix TcpDiscoveryCoordinatorFailureTest.testClusterFailedNewCoordinatorInitialized() (#8073) --- .../tcp/TcpDiscoveryCoordinatorFailureTest.java | 41 ++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryCoordinatorFailureTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryCoordinatorFailureTest.java index fc3adcc..89f968c 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryCoordinatorFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryCoordinatorFailureTest.java @@ -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); }