aahmed-se commented on a change in pull request #2101: Migrate compaction and 
s3 offload test to testcontainers
URL: https://github.com/apache/incubator-pulsar/pull/2101#discussion_r202786268
 
 

 ##########
 File path: 
tests/integration-tests-topologies/src/main/java/org/apache/pulsar/tests/topologies/PulsarCluster.java
 ##########
 @@ -193,24 +208,25 @@ public void start() throws Exception {
             String name = "pulsar-" + serviceName + "-" + i;
             T container = containerCreator.apply(name);
             containers.put(name, container);
-            startFutures.add(CompletableFuture.runAsync(() -> 
container.start()));
         }
-        CompletableFuture.allOf(startFutures.toArray(new 
CompletableFuture[startFutures.size()])).join();
-        log.info("Successfully started {} {} containers", numContainers, 
serviceName);
         return containers;
     }
 
     public void stop() {
-        Stream.of(proxyContainer, csContainer, 
zkContainer).parallel().forEach(GenericContainer::stop);
-        
workerContainers.values().parallelStream().forEach(GenericContainer::stop);
-        
brokerContainers.values().parallelStream().forEach(GenericContainer::stop);
-        
bookieContainers.values().parallelStream().forEach(GenericContainer::stop);
-        if (null != spec.externalServices()) {
-            spec.externalServices().values()
-                .parallelStream()
-                .forEach(GenericContainer::stop);
+
+        Stream<GenericContainer> containers = Streams.concat(
+                workerContainers.values().stream(),
+                brokerContainers.values().stream(),
+                bookieContainers.values().stream(),
+                Stream.of(proxyContainer, csContainer, zkContainer)
+        );
+
+        if (spec.externalServices() != null) {
+            containers = Streams.concat(containers, 
spec.externalServices().values().stream());
         }
 
+        containers.forEach(GenericContainer::stop);
 
 Review comment:
   it's parallel now

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to