Skip to content

Commit

Permalink
fix: don't strip strace on start failures
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Jun 1, 2023
1 parent 9aaa021 commit 700e37b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 700e37b

Please sign in to comment.