pvary commented on code in PR #18241:
URL: https://github.com/apache/iceberg/pull/18241#discussion_r4091959419


##########
flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSinkV2.java:
##########
@@ -245,12 +247,14 @@ public void testDeleteStats() throws Exception {
         expectedRecords,
         SnapshotRef.MAIN_BRANCH);
 
-    SnapshotChanges changes = SnapshotChanges.builderFor(table).build();
+    // The committer may append an empty snapshot after the change log commit
+    Snapshot snapshot = Iterables.getOnlyElement(findValidSnapshots());
+    SnapshotChanges changes = 
SnapshotChanges.builderFor(table).snapshot(snapshot).build();

Review Comment:
   Long wait caused `flink.max-continuous-empty-commits` to trigger and create 
a new empty commit on the top of the one we want to check. 
`findValidSnapshots()` finds the commits with manifest - so it finds the last 
commit with changes.



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