Cole-Greer commented on code in PR #3090:
URL: https://github.com/apache/tinkerpop/pull/3090#discussion_r2029403643


##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/GeneralLiteralVisitorTest.java:
##########
@@ -500,8 +501,8 @@ public void shouldParseCurrentDate() {
             final GremlinParser parser = new GremlinParser(new 
CommonTokenStream(lexer));
             final GremlinParser.DateLiteralContext ctx = parser.dateLiteral();
 
-            final Date dt = (Date) new GenericLiteralVisitor(new 
GremlinAntlrToJava()).visitDateLiteral(ctx);
-            assertTrue(new Date().getTime() - dt.getTime() < 1000);
+            final OffsetDateTime dt = (OffsetDateTime) new 
GenericLiteralVisitor(new GremlinAntlrToJava()).visitDateLiteral(ctx);
+            assertTrue(OffsetDateTime.now(UTC).toEpochSecond() - 
dt.toEpochSecond() < 1000);

Review Comment:
   The < 1000 is too broad here as the units have changed from millis to 
seconds.
   ```suggestion
               assertTrue(OffsetDateTime.now(UTC).toInstant().toEpochMilli() - 
dt.toInstant().toEpochMilli() < 1000);
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to