Cyrill commented on code in PR #3629:
URL: https://github.com/apache/ignite-3/pull/3629#discussion_r1579943253


##########
modules/index/src/test/java/org/apache/ignite/internal/index/IndexManagerTest.java:
##########
@@ -226,7 +226,10 @@ private void createAndStartComponents() {
                 lowWatermark
         );
 
-        assertThat(allOf(metaStorageManager.start(), catalogManager.start(), 
indexManager.start()), willCompleteSuccessfully());
+        assertThat(
+                allOf(metaStorageManager.startAsync(), 
catalogManager.startAsync(), indexManager.startAsync()),

Review Comment:
   done



##########
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java:
##########
@@ -1175,24 +1176,58 @@ public static byte[] byteBufferToByteArray(ByteBuffer 
buffer) {
         }
     }
 
+    private static CompletableFuture<Void> startAsync(Stream<? extends 
IgniteComponent> components) {
+        return allOf(components
+                .filter(Objects::nonNull)
+                .map(IgniteComponent::startAsync)
+                .toArray(CompletableFuture[]::new));
+    }
+
+    /**
+     * Asynchronously starts all ignite components.
+     *
+     * @param components Array of ignite components to start.
+     * @return CompletableFuture that will be completed when all components 
are started.
+     */
+    public static CompletableFuture<Void> startAsync(IgniteComponent... 
components) {
+        return startAsync(Stream.of(components));
+    }
+
+    /**
+     * Asynchronously starts all ignite components.
+     *
+     * @param components Collection of ignite components to start.
+     * @return CompletableFuture that will be completed when all components 
are started.
+     */
+    public static CompletableFuture<Void> startAsync(Collection<? extends 
IgniteComponent> components) {
+        return startAsync(components.stream());
+    }
+
+    private static CompletableFuture<Void> stopAsync(Stream<? extends 
IgniteComponent> components) {

Review Comment:
   done



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

Reply via email to