sumeetgajjar commented on code in PR #4825:
URL: https://github.com/apache/iceberg/pull/4825#discussion_r881207933


##########
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java:
##########
@@ -420,7 +420,7 @@ public void testOlderThanTimestamp() throws 
InterruptedException {
 
     long timestamp = System.currentTimeMillis();
 
-    waitUntilAfter(System.currentTimeMillis());
+    waitUntilAfter(System.currentTimeMillis() + 1000L);

Review Comment:
   > That gives you the ability to create one file, wait until the next 
millisecond, create another, wait, etc. to make sure they don't have the same 
write time.
   
   Hi @rdblue - I agree with you. 
   Writing the file at the very next millisecond should do the trick here but I 
believe that is what the original code is doing and still, we are seeing the 
failure. 
   
   We experimented with various values less than 1000L milliseconds but none of 
them got us a 100% success rate for the test. 1000L was the lowest value that 
gave a 100% success rate.
   
   I can investigate more if required or use the 1000L value. Using a value of 
1000L would make this test equivalent to what we had before #4711 
   
   Please let me know your thoughts.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to