Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't strip stack trace on startup failures #33731

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public static void run(Application application, Class<? extends QuarkusApplicati
System.err.println(rootCause.getMessage());
} else {
// If it is not a ConfigurationException it should be safe to call ConfigProvider.getConfig here
applicationLogger.errorv(rootCause, "Failed to start application (with profile {0})",
applicationLogger.errorv(e, "Failed to start application (with profile {0})",
ConfigUtils.getProfiles());
ensureConsoleLogsDrained();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.runtime.util.ExceptionUtil;
import io.quarkus.test.QuarkusDevModeTest;
import io.restassured.RestAssured;

Expand Down Expand Up @@ -45,7 +46,8 @@ public void testRepairUsingDevMode() {
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
assertThat(config.getLogRecords()).anySatisfy(r -> {
assertThat(r.getMessage()).contains("Failed to start application");
assertThat(r.getThrown().getMessage()).contains("Migration checksum mismatch for migration version 1.0.0");
assertThat(ExceptionUtil.getRootCause(r.getThrown()).getMessage())
.contains("Migration checksum mismatch for migration version 1.0.0");
});
RestAssured.get("/flyway/current-version").then().statusCode(500);
});
Expand Down