mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Ensure SpringBootDITEL fails with the original failure
See gh-9534
This commit is contained in:
parent
94ea3e8618
commit
2c48087604
@ -44,11 +44,15 @@ public class SpringBootDependencyInjectionTestExecutionListener
|
||||
super.prepareTestInstance(testContext);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ApplicationContext context = testContext.getApplicationContext();
|
||||
if (context instanceof ConfigurableApplicationContext) {
|
||||
ConditionEvaluationReport report = ConditionEvaluationReport
|
||||
.get(((ConfigurableApplicationContext) context).getBeanFactory());
|
||||
System.err.println(new ConditionEvaluationReportMessage(report));
|
||||
try {
|
||||
ApplicationContext context = testContext.getApplicationContext();
|
||||
if (context instanceof ConfigurableApplicationContext) {
|
||||
ConditionEvaluationReport report = ConditionEvaluationReport
|
||||
.get(((ConfigurableApplicationContext) context).getBeanFactory());
|
||||
System.err.println(new ConditionEvaluationReportMessage(report));
|
||||
}
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user