Vladsz83 commented on code in PR #11327:
URL: https://github.com/apache/ignite/pull/11327#discussion_r1598865726
##########
modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNetworkIssuesTest.java:
##########
@@ -383,6 +415,54 @@ private void simulateFailureOfTwoNodes(boolean
sequentionally) throws Exception
}
}
+ /**
+ * This test uses node failure by stopping service threads, which makes
the node unresponsive and results in
+ * failing connection to the server.
+ *
+ * @throws Exception If failed.
+ * @see TcpDiscoverySpi#simulateNodeFailure()
+ */
+ @Test
+ public void testCheckNodeFailureSocketConnectionLogMessage() throws
Exception {
+ ListeningTestLogger testLog = new ListeningTestLogger(log);
+
+ Collection<LogListener> lsnrs = new ArrayList<>();
+
+ lsnrs.add(LogListener.matches("Checking connection to
node").andMatches("result=failed").times(1).build());
+ lsnrs.add(LogListener.matches("Connection check to previous node
failed").times(1).build());
+
+ lsnrs.forEach(testLog::registerListener);
+
+ TcpDiscoverySpi spi0 = new TcpDiscoverySpi();
+
+ startGrid(getTestConfigWithSpi(spi0, "ignite-0"));
+
+ IgniteConfiguration cfg1 = getTestConfigWithSpi(new TcpDiscoverySpi(),
"ignite-1");
+ cfg1.setGridLogger(testLog);
+
+ startGrid(cfg1);
+
+ startGrid(getTestConfigWithSpi(new TcpDiscoverySpi(), "ignite-2"));
Review Comment:
Why not something like `IgniteConfiguration cfg =
getConfiguration(getTestIgniteInstanceName(1));`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]