lrsb commented on code in PR #16011:
URL: https://github.com/apache/iceberg/pull/16011#discussion_r3266726821


##########
flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestDynamicCommitter.java:
##########
@@ -512,8 +607,7 @@ void testTableBranchAtomicCommitForAppendOnlyData() throws 
Exception {
     // Two committables, one for each snapshot / table / branch.
     assertThat(table.snapshots()).hasSize(2);
 
-    Snapshot snapshot1 = Iterables.getFirst(table.snapshots(), null);
-    
assertThat(snapshot1.snapshotId()).isEqualTo(table.refs().get("branch1").snapshotId());

Review Comment:
   Checking whether branch1 is always at index 0 of snapshots is wrong and it 
was making the test flaky



##########
flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestDynamicCommitter.java:
##########
@@ -531,8 +625,7 @@ void testTableBranchAtomicCommitForAppendOnlyData() throws 
Exception {
                 .put("total-records", "66")
                 .build());
 
-    Snapshot snapshot2 = Iterables.get(table.snapshots(), 1);
-    
assertThat(snapshot2.snapshotId()).isEqualTo(table.refs().get("branch2").snapshotId());

Review Comment:
   Same as above



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