We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 900c653 commit 5a9598eCopy full SHA for 5a9598e
src/test/java/com/dashjoin/jsonata/ThreadSafetyTest.java
@@ -284,4 +284,13 @@ public void testNowWithCachedInstance() throws Exception {
284
assertNotEquals(r1, r2, "$now() should return different values on different calls");
285
}
286
287
+ @Test
288
+ public void testMillisWithCachedInstance() throws Exception {
289
+ Jsonata expr = jsonata("$millis()");
290
+ long r1 = ((Number) expr.evaluate(null)).longValue();
291
+ Thread.sleep(10);
292
+ long r2 = ((Number) expr.evaluate(null)).longValue();
293
+ assertTrue(r2 > r1, "$millis() should advance across separate evaluations");
294
+ }
295
+
296
0 commit comments