Browse Source

Clear system property set by log file registration

Closes gh-20790
pull/20793/head
Andy Wilkinson 6 years ago
parent
commit
281f4d4ceb
  1. 4
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerIntegrationTests.java

4
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerIntegrationTests.java

@ -30,6 +30,7 @@ import org.springframework.boot.builder.SpringApplicationBuilder; @@ -30,6 +30,7 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.event.ApplicationStartingEvent;
import org.springframework.boot.logging.LogFile;
import org.springframework.boot.logging.LoggingSystem;
import org.springframework.boot.logging.LoggingSystemProperties;
import org.springframework.boot.testsupport.system.CapturedOutput;
import org.springframework.boot.testsupport.system.OutputCaptureExtension;
import org.springframework.context.ApplicationListener;
@ -64,6 +65,9 @@ class LoggingApplicationListenerIntegrationTests { @@ -64,6 +65,9 @@ class LoggingApplicationListenerIntegrationTests {
assertThat(service.logFile).isNotNull();
assertThat(service.logFile.toString()).isEqualTo(logFile);
}
finally {
System.clearProperty(LoggingSystemProperties.LOG_FILE);
}
}
@Test

Loading…
Cancel
Save