stevenzwu commented on a change in pull request #4117:
URL: https://github.com/apache/iceberg/pull/4117#discussion_r809416927



##########
File path: 
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSink.java
##########
@@ -277,15 +277,15 @@ public void testHashDistributeMode() throws Exception {
       ));
 
       // Sometimes we will have more than one checkpoint if we pass the auto 
checkpoint interval,
-      // thus producing multiple snapshots.  Here we assert that each snapshot 
has only 1 file per partition.
+      // thus producing multiple snapshots.  Here we assert that each snapshot 
has no more than 1 file per partition.
       Map<Long, List<DataFile>> snapshotToDataFiles = 
SimpleDataUtil.snapshotToDataFiles(table);
       for (List<DataFile> dataFiles : snapshotToDataFiles.values()) {
-        Assert.assertEquals("There should be 1 data file in partition 'aaa'", 
1,
-            SimpleDataUtil.matchingPartitions(dataFiles, table.spec(), 
ImmutableMap.of("data", "aaa")).size());
-        Assert.assertEquals("There should be 1 data file in partition 'bbb'", 
1,
-            SimpleDataUtil.matchingPartitions(dataFiles, table.spec(), 
ImmutableMap.of("data", "bbb")).size());
-        Assert.assertEquals("There should be 1 data file in partition 'ccc'", 
1,
-            SimpleDataUtil.matchingPartitions(dataFiles, table.spec(), 
ImmutableMap.of("data", "ccc")).size());
+        Assert.assertTrue("There should be no more than 1 data file in 
partition 'aaa'",
+            SimpleDataUtil.matchingPartitions(dataFiles, table.spec(), 
ImmutableMap.of("data", "aaa")).size() < 2);

Review comment:
       The error you encountered is value is 2 (not 1). Hence I said this 
change from `== 1` to `< 2` won't even work around the error. anyway, it seems 
that other discussions in the PR already led us to the right root cause and 
solution.




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