ivandasch commented on a change in pull request #8289:
URL: https://github.com/apache/ignite/pull/8289#discussion_r496674374



##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
##########
@@ -203,6 +206,30 @@ public void testForceServerAndClientDebugLogs() throws 
Exception {
         doForceServerAndClientTest(log);
     }
 
+    @Test
+    public void checkMessageOnCoordinatorChangeTest() throws Exception {
+        Ignite server1 = startGrid("server1");
+
+        Ignite client = startClientGrid("client");
+
+        Ignite server2 = startGrid("server2");
+
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.INFO);
+
+        setLogger(log, server2);
+
+        server1.close();

Review comment:
       Use `stopGrid("client")` and etc.

##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
##########
@@ -203,6 +206,30 @@ public void testForceServerAndClientDebugLogs() throws 
Exception {
         doForceServerAndClientTest(log);
     }
 
+    @Test
+    public void checkMessageOnCoordinatorChangeTest() throws Exception {
+        Ignite server1 = startGrid("server1");

Review comment:
       You can use indices instead of full name

##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
##########
@@ -203,6 +206,30 @@ public void testForceServerAndClientDebugLogs() throws 
Exception {
         doForceServerAndClientTest(log);
     }
 
+    @Test
+    public void checkMessageOnCoordinatorChangeTest() throws Exception {
+        Ignite server1 = startGrid("server1");
+
+        Ignite client = startClientGrid("client");
+
+        Ignite server2 = startGrid("server2");
+
+        MockLogger log = new MockLogger();
+
+        log.setLevel(Level.INFO);
+
+        setLogger(log, server2);
+
+        server1.close();
+
+        client.close();
+
+        assertEquals("There should be no message that the client was the 
coordinator", 0,

Review comment:
       ```
   assertFalse(log.logs().stream().anyMatch(msg -> msg.contains("Coordinator 
changed") && msg.contains("isClient=true")))
   ```
           




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to