You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/08/24 10:25:43 UTC

[GitHub] [logging-log4j2] garydgregory commented on a change in pull request #567: LOG4J2-3142: Use log event time millis for timestamp in log event adapter

garydgregory commented on a change in pull request #567:
URL: https://github.com/apache/logging-log4j2/pull/567#discussion_r694721875



##########
File path: log4j-1.2-api/src/test/java/org/apache/log4j/config/RewriteAppenderTest.java
##########
@@ -73,5 +74,6 @@ public void testRewrite() throws Exception {
         assertNotNull("No properties in the event", events.get(0).getProperties());
         assertTrue("Key was not inserted", events.get(0).getProperties().containsKey("key2"));
         assertEquals("Key value is incorrect", "Log4j", events.get(0).getProperties().get("key2"));
+        assertTrue("Timestamp is before point of logging", events.get(0).getTimeStamp() >= logTime);
     }

Review comment:
       I'm not sure if we've fixed this elsewhere but I've actually seen this kind of test fail when running builds just around the daylight saving time change. Probably not worth making the test more complex. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org