alievmirza commented on code in PR #6243: URL: https://github.com/apache/ignite-3/pull/6243#discussion_r2213649636
########## modules/runner/src/testFixtures/java/org/apache/ignite/internal/BaseIgniteRestartTest.java: ########## @@ -139,15 +140,27 @@ void setUp(TestInfo testInfo) { public void afterEachTest() throws Exception { var closeables = new ArrayList<AutoCloseable>(); - for (IgniteServer node : IGNITE_SERVERS) { + List<String> serverNames = IGNITE_SERVERS.stream() + .filter(Objects::nonNull) + .map(IgniteServer::name) + .collect(toList()); + + log.info("Shutting the cluster down [nodes={}]", serverNames); + + // Stop all nodes in reverse order to ensure that the first started node (MS node) is stopped last. + for (int i = IGNITE_SERVERS.size() - 1; i >= 0; i--) { Review Comment: rewritten completely, please check ########## modules/runner/src/testFixtures/java/org/apache/ignite/internal/BaseIgniteRestartTest.java: ########## @@ -139,15 +140,27 @@ void setUp(TestInfo testInfo) { public void afterEachTest() throws Exception { var closeables = new ArrayList<AutoCloseable>(); - for (IgniteServer node : IGNITE_SERVERS) { + List<String> serverNames = IGNITE_SERVERS.stream() + .filter(Objects::nonNull) + .map(IgniteServer::name) + .collect(toList()); + + log.info("Shutting the cluster down [nodes={}]", serverNames); + + // Stop all nodes in reverse order to ensure that the first started node (MS node) is stopped last. + for (int i = IGNITE_SERVERS.size() - 1; i >= 0; i--) { + IgniteServer node = IGNITE_SERVERS.get(i); + if (node != null) { closeables.add(node::shutdown); } } if (!partialNodes.isEmpty()) { - for (PartialNode partialNode : partialNodes) { - closeables.add(partialNode::stop); + for (int i = partialNodes.size() - 1; i >= 0; i--) { Review Comment: rewritten completely, please 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org