Skip to content

Commit

Permalink
Startables#deepStart with varargs (#3261)
Browse files Browse the repository at this point in the history
Co-authored-by: Jochen Christ <jochen.christ@innoq.com>
  • Loading branch information
jochenchrist and jochenchrist committed Dec 12, 2020
1 parent 6932c7a commit 87da74e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.testcontainers.lifecycle;

import java.util.Arrays;
import lombok.experimental.UtilityClass;

import java.util.Collection;
Expand Down Expand Up @@ -42,6 +43,13 @@ public CompletableFuture<Void> deepStart(Iterable<? extends Startable> startable
return deepStart(StreamSupport.stream(startables.spliterator(), false));
}

/**
* @see #deepStart(Stream)
*/
public CompletableFuture<Void> deepStart(Startable... startables) {
return deepStart(Arrays.stream(startables));
}

/**
* Start every {@link Startable} recursively and asynchronously and join on the result.
*
Expand Down

0 comments on commit 87da74e

Please sign in to comment.