thomasmueller commented on code in PR #1829:
URL: https://github.com/apache/jackrabbit-oak/pull/1829#discussion_r1821166493


##########
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedTreeStoreIT.java:
##########
@@ -364,11 +365,12 @@ public void getOnlyModified() throws Exception {
             contentDamBuilder.child("old.png");
             contentDamBuilder.child("change.png").setProperty("test", 0);
             rwNodeStore.merge(rootBuilder, EmptyHook.INSTANCE, 
CommitInfo.EMPTY);
-            long oldMod = 
NodeDocument.getModifiedInSecs(System.currentTimeMillis());
+            Clock clock = rwNodeStore.getClock();
+            long oldMod = NodeDocument.getModifiedInSecs(clock.getTime());
             // wait until the modified time changes
             do {
-                Thread.sleep(10);
-                minModified = 
NodeDocument.getModifiedInSecs(System.currentTimeMillis());
+                clock.waitUntil(clock.getTime() + 1000);

Review Comment:
   Great! I didn't think about using the virtual clock. I wasn't aware 
waitUntil increments the counter...



-- 
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