You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/08 19:17:58 UTC

[GitHub] [iceberg] szehon-ho commented on a change in pull request #4033: Fix random failure of TestCopyOnWriteUpdate::testUpdateWithoutCondition

szehon-ho commented on a change in pull request #4033:
URL: https://github.com/apache/iceberg/pull/4033#discussion_r801977950



##########
File path: spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestUpdate.java
##########
@@ -219,7 +220,14 @@ public void testUpdateWithoutCondition() {
     Assert.assertEquals("Should have 4 snapshots", 4, Iterables.size(table.snapshots()));
 
     Snapshot currentSnapshot = table.currentSnapshot();
-    validateCopyOnWrite(currentSnapshot, "2", "3", "3");
+    Assert.assertEquals("Operation must match", OVERWRITE, currentSnapshot.operation());
+    Assert.assertEquals("Changed partitions count must match",
+        "2", currentSnapshot.summary().get("changed-partition-count"));
+    Assert.assertEquals("Number of added data files should be same as deleted",

Review comment:
       Thanks , you are right.  Fixed the checks, and also used SnapshotSummary.
   
   But I'm curious, is it still possible to get only 1 data file in extreme worse case?




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org