testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

Short-circuit CompletableFuture returned by Startables#deepStart on exception

Open pivovarit opened this issue 3 years ago • 0 comments

CompletableFuture.allOf returns a future that completes only when all provided futures complete either successfully or exceptionally, which means that when one future fails, you still need to wait until the remaining futures complete... only to be presented with the exception that failed at the beginning.

This is safe, according to JMM.

Fixes: https://github.com/testcontainers/testcontainers-java/issues/2249

Recycled https://github.com/testcontainers/testcontainers-java/pull/2251

pivovarit avatar Sep 30 '22 16:09 pivovarit