mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix Windows build failures
See gh-23098
This commit is contained in:
parent
a48c98b469
commit
e1ad2cdab3
@ -96,23 +96,25 @@ class ApplicationAvailabilityBeanTests {
|
||||
@Test
|
||||
void stateChangesAreLogged(CapturedOutput output) {
|
||||
AvailabilityChangeEvent.publish(this.context, LivenessState.CORRECT);
|
||||
assertThat(output).contains("Application availability state LivenessState changed to CORRECT\n");
|
||||
assertThat(output)
|
||||
.contains("Application availability state LivenessState changed to CORRECT" + System.lineSeparator());
|
||||
AvailabilityChangeEvent.publish(this.context, LivenessState.BROKEN);
|
||||
assertThat(output).contains("Application availability state LivenessState changed from CORRECT to BROKEN\n");
|
||||
assertThat(output).contains(
|
||||
"Application availability state LivenessState changed from CORRECT to BROKEN" + System.lineSeparator());
|
||||
}
|
||||
|
||||
@Test
|
||||
void stateChangesAreLoggedWithExceptionSource(CapturedOutput output) {
|
||||
AvailabilityChangeEvent.publish(this.context, new IOException("connection error"), LivenessState.BROKEN);
|
||||
assertThat(output).contains("Application availability state LivenessState changed to BROKEN: "
|
||||
+ "java.io.IOException: connection error\n");
|
||||
+ "java.io.IOException: connection error" + System.lineSeparator());
|
||||
}
|
||||
|
||||
@Test
|
||||
void stateChangesAreLoggedWithOtherSource(CapturedOutput output) {
|
||||
AvailabilityChangeEvent.publish(this.context, new CustomEventSource(), LivenessState.BROKEN);
|
||||
assertThat(output).contains("Application availability state LivenessState changed to BROKEN: "
|
||||
+ CustomEventSource.class.getName() + "\n");
|
||||
+ CustomEventSource.class.getName() + System.lineSeparator());
|
||||
}
|
||||
|
||||
enum TestState implements AvailabilityState {
|
||||
|
Loading…
Reference in New Issue
Block a user