You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2020/08/01 17:20:12 UTC
[logging-log4j2] branch release-2.x updated: Test was failing on
the last day of the month
This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new a6cf6fa Test was failing on the last day of the month
a6cf6fa is described below
commit a6cf6fad92aae575cccd260b6854455aa46d284c
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sat Aug 1 10:19:58 2020 -0700
Test was failing on the last day of the month
---
.../test/java/org/apache/logging/log4j/core/filter/TimeFilterTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/filter/TimeFilterTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/filter/TimeFilterTest.java
index 3c446b8..f067092 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/filter/TimeFilterTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/filter/TimeFilterTest.java
@@ -192,7 +192,7 @@ public class TimeFilterTest {
//assertSame(Filter.Result.NEUTRAL, filter.filter(null, Level.ERROR, null, (Object) null, (Throwable) null));
assertSame("Time " + CLOCKTIME + " is not within range: " + filter.toString(), Filter.Result.NEUTRAL, filter.filter(event));
- cal.roll(Calendar.DAY_OF_MONTH, true);
+ cal.add(Calendar.DATE, 1);
cal.set(Calendar.HOUR_OF_DAY, 2);
CLOCKTIME = cal.getTimeInMillis();
event = Log4jLogEvent.newBuilder().setTimeMillis(CLOCKTIME).build();