From fecbc5f0f3bd626a4e01f3545da2939cd6de7058 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 12 May 2023 10:24:09 +0100 Subject: [PATCH] Improve diagnostics for test initialization failures Previously, the application's log output was only reported through an exception's message. This resulted in it appearing in the local HTML test report but not in the information captured in a build scan. This impedes diagnosis of CI failures where the HTML test report isn't readily available. This commit updates AwaitApplication to write the message to System.err as well. This results in it being captured in the build scan allowing it to be view in Gradle Enterprise. --- .../aot/smoketest/support/junit/AwaitApplication.java | 1 + 1 file changed, 1 insertion(+) diff --git a/aot-smoke-test-support/src/main/java/org/springframework/aot/smoketest/support/junit/AwaitApplication.java b/aot-smoke-test-support/src/main/java/org/springframework/aot/smoketest/support/junit/AwaitApplication.java index 2de9c1a9..03113cee 100644 --- a/aot-smoke-test-support/src/main/java/org/springframework/aot/smoketest/support/junit/AwaitApplication.java +++ b/aot-smoke-test-support/src/main/java/org/springframework/aot/smoketest/support/junit/AwaitApplication.java @@ -63,6 +63,7 @@ class AwaitApplication implements BeforeAllCallback { } } message.append("\n"); + System.err.println(message.toString()); throw new IllegalStateException(message.toString()); }