This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/2.x by this push:
new ce3a6de7a5 Try fixing `FileOutputTest` on Windows
ce3a6de7a5 is described below
commit ce3a6de7a53a879764dadf01aae35298a039e6be
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();
}
}