rpuch commented on code in PR #1397:
URL: https://github.com/apache/ignite-3/pull/1397#discussion_r1043259853


##########
modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java:
##########
@@ -178,9 +177,10 @@ void setUp(@WorkDirectory Path workDir, TestInfo testInfo) 
{
     }
 
     @AfterEach
-    void tearDown() {
-        cluster.parallelStream().forEach(Node::beforeNodeStop);
-        cluster.parallelStream().forEach(Node::stop);
+    void tearDown() throws Exception {
+        IgniteUtils.closeAll(cluster.parallelStream().map(node -> 
node::beforeNodeStop));

Review Comment:
   Well, 'call beforeNodeStop() on object node' is about  calling a method, or 
about carrying out pre-stop actions, but it does not seem to have anything to 
do with 'closing' anything. The fact that we convince ourselves that any action 
might be called a 'closure' (as in act of closing, not as a capturing lambda) 
is a sign of an abuse (in my book).
   
   Just a nitpick, not a requirement, of course.



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

Reply via email to