diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java index ff2f70cf67db..1ad0b4dfbb5c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java @@ -169,7 +169,7 @@ private Environment tryStart() log.info("Started environment %s with containers:\n%s", name, table.render()); // After deepStart all containers should be running and healthy - checkState(allContainersHealthy(containers), "Not all containers are running or healthy"); + checkState(allContainersHealthy(containers), format("The containers %s are not running or healthy", unhealthyContainers(containers))); listener.environmentStarted(this); return this; @@ -332,6 +332,13 @@ private static boolean allContainersHealthy(Iterable containers .allMatch(Environment::containerIsHealthy); } + private static List unhealthyContainers(Iterable containers) + { + return Streams.stream(containers) + .filter(Environment::containerIsHealthy) + .toList(); + } + private static boolean containerIsHealthy(DockerContainer container) { if (container.isTemporary()) {