alex-plekhanov commented on code in PR #11637:
URL: https://github.com/apache/ignite/pull/11637#discussion_r1837036833
##########
modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java:
##########
@@ -2201,6 +2211,27 @@ public void testDuplicatedDiscoveryDataRemoved() throws
Exception {
*/
@Test
public void testFailedNodeRestoreConnection() throws Exception {
+ assertFalse(checkRestoreConnection());
+
+ setLoggerDebugLevel();
+
+ assertTrue(checkRestoreConnection());
+ }
+
+ /** @throws Exception If failed.*/
+ private boolean checkRestoreConnection() throws Exception {
+ ListeningTestLogger testLog = new ListeningTestLogger(log);
+
+ LogListener lsnr = LogListener
+ .matches(Pattern.compile("Failed to ping node \\[.*\\]\\.
Reached the timeout"))
+ .build();
+
+ testLog.registerListener(lsnr);
+
+ boolean result;
Review Comment:
Local variable is redundant. `return lsnr.check()` can be used. But it's
better to pass additional parameter for `checkRestoreConnection` and check it
at the end of the method, something like: `assertEquals(logMsgExpected,
lsnr.check())`
--
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]