This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/main by this push:
new 168369e245 Try fixing `FileOutputTest` on Windows
168369e245 is described below
commit 168369e2457886bed7a6c5df27b5ccc348ebf2ae
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Mon Nov 13 21:19:25 2023 +0100
Try fixing `FileOutputTest` on Windows
---
.../test/java/org/apache/logging/log4j/core/config/FileOutputTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/FileOutputTest.java
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/FileOutputTest.java
index 75bcdd51ce..c5f5d54356 100644
---
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/FileOutputTest.java
+++
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/FileOutputTest.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.nio.file.Path;
import org.apache.logging.log4j.core.test.junit.LoggerContextSource;
+import org.apache.logging.log4j.status.StatusLogger;
import org.apache.logging.log4j.test.junit.TempLoggingDir;
import org.junit.jupiter.api.Test;
@@ -38,6 +39,8 @@ public class FileOutputTest {
public void testConfig() throws IOException {
final Path logFile = loggingPath.resolve("status.log");
assertThat(logFile).exists().isNotEmptyFile();
+ // Closes the current listeners
+ StatusLogger.getLogger().reset();
}
}