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.
This commit is contained in:
Andy Wilkinson
2023-05-12 10:24:09 +01:00
parent f5297f0434
commit fecbc5f0f3

View File

@@ -63,6 +63,7 @@ class AwaitApplication implements BeforeAllCallback {
}
}
message.append("\n");
System.err.println(message.toString());
throw new IllegalStateException(message.toString());
}