mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish
This commit is contained in:
parent
bc814d2039
commit
6d1d9eb816
@ -59,8 +59,8 @@ public class DataSourceBeanCreationFailureAnalyzerTests {
|
||||
public void failureAnalysisIsPerformedWithActiveProfiles() {
|
||||
this.environment.setActiveProfiles("first", "second");
|
||||
FailureAnalysis failureAnalysis = performAnalysis(TestConfiguration.class);
|
||||
assertThat(failureAnalysis.getAction()).contains(
|
||||
"(the profiles first,¬second are currently active)");
|
||||
assertThat(failureAnalysis.getAction())
|
||||
.contains("(the profiles first,¬second are currently active)");
|
||||
}
|
||||
|
||||
private FailureAnalysis performAnalysis(Class<?> configuration) {
|
||||
@ -77,6 +77,7 @@ public class DataSourceBeanCreationFailureAnalyzerTests {
|
||||
context.setEnvironment(this.environment);
|
||||
context.register(configuration);
|
||||
context.refresh();
|
||||
context.close();
|
||||
return null;
|
||||
}
|
||||
catch (BeanCreationException ex) {
|
||||
|
@ -30,7 +30,7 @@ public class SampleKafkaApplication {
|
||||
|
||||
@Bean
|
||||
public ApplicationRunner runner(Producer producer) {
|
||||
return args -> producer.send(new SampleMessage(1, "A simple test message"));
|
||||
return (args) -> producer.send(new SampleMessage(1, "A simple test message"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user