nastra commented on code in PR #9994:
URL: https://github.com/apache/iceberg/pull/9994#discussion_r1531686477


##########
core/src/test/java/org/apache/iceberg/TestRewriteFiles.java:
##########
@@ -420,28 +393,27 @@ public void testFailure() {
         table.newRewrite().rewriteFiles(Sets.newSet(FILE_A), 
Sets.newSet(FILE_B));
     Snapshot pending = apply(rewrite, branch);
 
-    Assert.assertEquals("Should produce 2 manifests", 2, 
pending.allManifests(table.io()).size());
+    assertThat(pending.allManifests(table.io())).hasSize(2);
     ManifestFile manifest1 = pending.allManifests(table.io()).get(0);
     ManifestFile manifest2 = pending.allManifests(table.io()).get(1);
 
     validateManifestEntries(manifest1, ids(pending.snapshotId()), 
files(FILE_B), statuses(ADDED));
     validateManifestEntries(manifest2, ids(pending.snapshotId()), 
files(FILE_A), statuses(DELETED));
 
-    Assertions.assertThatThrownBy(() -> commit(table, rewrite, branch))
+    assertThatThrownBy(() -> commit(table, rewrite, branch))
         .isInstanceOf(CommitFailedException.class)
         .hasMessage("Injected failure");
 
-    Assert.assertFalse("Should clean up new manifest", new 
File(manifest1.path()).exists());
-    Assert.assertFalse("Should clean up new manifest", new 
File(manifest2.path()).exists());
+    assertThat(new File(manifest1.path())).doesNotExist();
+    assertThat(new File(manifest2.path())).doesNotExist();
 
     // As commit failed all the manifests added with rewrite should be cleaned 
up
-    Assert.assertEquals("Only 1 manifest should exist", 1, 
listManifestFiles().size());
+    assertThat(listManifestFiles()).hasSize(1);
   }
 
-  @Test
+  @TestTemplate
   public void testFailureWhenRewriteBothDataAndDeleteFiles() {
-    Assume.assumeTrue(
-        "Rewriting delete files is only supported in iceberg format v2. ", 
formatVersion > 1);
+    assumeThat(formatVersion).isGreaterThan(1);

Review Comment:
   please keep the description here



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to