You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/16 16:35:59 UTC

[logging-log4j2] branch master updated: Better test setup.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new b6c5fcc  Better test setup.
b6c5fcc is described below

commit b6c5fcc27442a1aa641f34d812af40962d2d5100
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 16 11:35:13 2022 -0500

    Better test setup.
---
 .../org/apache/log4j/config/PropertiesRollingWithPropertiesTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesRollingWithPropertiesTest.java b/log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesRollingWithPropertiesTest.java
index c149ab9..fcb757a 100644
--- a/log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesRollingWithPropertiesTest.java
+++ b/log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesRollingWithPropertiesTest.java
@@ -46,9 +46,10 @@ public class PropertiesRollingWithPropertiesTest {
 
     @Test
     public void testProperties() throws Exception {
+        final Path path = Paths.get(TEST_DIR, "somefile.log");
+        Files.deleteIfExists(path);
         final Logger logger = LogManager.getLogger("test");
         logger.debug("This is a test of the root logger");
-        final Path path = Paths.get(TEST_DIR, "somefile.log");
         assertTrue("Log file was not created", Files.exists(path));
         assertTrue("Log file is empty", Files.size(path) > 0);