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 2018/11/28 05:43:29 UTC

[logging-log4j2] branch master updated: Fix failure on my machine due to odd timing issue.

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 aea9cc0  Fix failure on my machine due to odd timing issue.
aea9cc0 is described below

commit aea9cc0a2cc9d8ac709bc98bb357204d44451416
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Nov 27 22:43:27 2018 -0700

    Fix failure on my machine due to odd timing issue.
---
 .../log4j/core/appender/rolling/OnStartupTriggeringPolicyTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/OnStartupTriggeringPolicyTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/OnStartupTriggeringPolicyTest.java
index 1f81dfc..d32f80d 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/OnStartupTriggeringPolicyTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/OnStartupTriggeringPolicyTest.java
@@ -52,7 +52,7 @@ public class OnStartupTriggeringPolicyTest {
     private static final FastDateFormat formatter = FastDateFormat.getInstance("MM-dd-yyyy");
 
     @Rule
-    public CleanFolders rule = new CleanFolders("target/rollOnStartup");
+    public CleanFolders rule = new CleanFolders(TARGET_FOLDER);
 
     @Test
     public void testPolicy() throws Exception {
@@ -71,7 +71,7 @@ public class OnStartupTriggeringPolicyTest {
         assertTrue(size > 0);
         assertEquals(copied, size);
 
-        Assert.assertTrue(target.toFile().setLastModified(timeStamp));
+        Assert.assertTrue(target.toFile().setLastModified(0));
         final PatternLayout layout = PatternLayout.newBuilder().setPattern("%msg").setConfiguration(configuration)
                 .build();
         final RolloverStrategy strategy = DefaultRolloverStrategy.newBuilder().setCompressionLevelStr("0")