This is an automated email from the ASF dual-hosted git repository.

nastra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 30c246a03b Core: Fix the timestamp race in 
TestFindFiles#testAsOfTimestamp (#18779)
30c246a03b is described below

commit 30c246a03b43f6f67ebc0e98c5adebef3dbe3c16
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Thu Nov 5 17:59:59 2026 +0100

    Core: Fix the timestamp race in TestFindFiles#testAsOfTimestamp (#18779)
    
    The as-of timestamp was read right after FILE_B's commit, so FILE_C's 
snapshot could land in the same millisecond and be included. Wait until the 
clock is past FILE_B's snapshot, and past the timestamp before committing 
FILE_C.
    
    Generated-by: Claude Code
---
 core/src/test/java/org/apache/iceberg/TestFindFiles.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/src/test/java/org/apache/iceberg/TestFindFiles.java 
b/core/src/test/java/org/apache/iceberg/TestFindFiles.java
index 9a473dd41b..e5435b3eba 100644
--- a/core/src/test/java/org/apache/iceberg/TestFindFiles.java
+++ b/core/src/test/java/org/apache/iceberg/TestFindFiles.java
@@ -138,7 +138,8 @@ public class TestFindFiles extends TestBase {
 
     table.newAppend().appendFile(FILE_B).commit();
 
-    long timestamp = System.currentTimeMillis();
+    // asOfTime includes a snapshot committed at the timestamp, so FILE_C's 
must come strictly later
+    long timestamp = table.currentSnapshot().timestampMillis();
 
     table.newAppend().appendFile(FILE_C).commit();
 

Reply via email to