Polish "Migrate LogbackLoggingSystemTests to JUnit 5"

See gh-17107
pull/17389/head
Andy Wilkinson 5 years ago
parent 569830cdca
commit df5d23ff6c

@ -38,18 +38,18 @@ public abstract class AbstractLoggingSystemTests {
private String originalTempFolder; private String originalTempFolder;
@BeforeEach @BeforeEach
public void configureTempDir(@TempDir Path temp) { void configureTempDir(@TempDir Path temp) {
this.originalTempFolder = System.getProperty(JAVA_IO_TMPDIR); this.originalTempFolder = System.getProperty(JAVA_IO_TMPDIR);
System.setProperty(JAVA_IO_TMPDIR, temp.toAbsolutePath().toString()); System.setProperty(JAVA_IO_TMPDIR, temp.toAbsolutePath().toString());
} }
@AfterEach @AfterEach
public void reinstateTempDir() { void reinstateTempDir() {
System.setProperty(JAVA_IO_TMPDIR, this.originalTempFolder); System.setProperty(JAVA_IO_TMPDIR, this.originalTempFolder);
} }
@AfterEach @AfterEach
public void clear() { void clear() {
System.clearProperty(LoggingSystemProperties.LOG_FILE); System.clearProperty(LoggingSystemProperties.LOG_FILE);
System.clearProperty(LoggingSystemProperties.PID_KEY); System.clearProperty(LoggingSystemProperties.PID_KEY);
} }

Loading…
Cancel
Save