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


##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java:
##########
@@ -390,42 +373,42 @@ public void testDeleteWithFalseCondition() {
     sql("DELETE FROM %s WHERE id = 1 AND id > 20", commitTarget());
 
     Table table = validationCatalog.loadTable(tableIdent);
-    Assert.assertEquals("Should have 2 snapshots", 2, 
Iterables.size(table.snapshots()));
+    assertThat(table.snapshots()).as("Should have 2 snapshots").hasSize(2);
 
     assertEquals(
         "Should have expected rows",
         ImmutableList.of(row(1, "hr"), row(2, "hardware")),
         sql("SELECT * FROM %s ORDER BY id", selectTarget()));
   }
 
-  @Test
+  @TestTemplate
   public void testDeleteFromEmptyTable() {
-    Assume.assumeFalse("Custom branch does not exist for empty table", 
"test".equals(branch));
+    assumeThat("test".equals(branch)).as("Custom branch does not exist for 
empty table").isFalse();

Review Comment:
   ```suggestion
       assumeThat(branch).as("Custom branch does not exist for empty 
table").isNotEqualTo("test");
   ```



##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java:
##########
@@ -390,42 +373,42 @@ public void testDeleteWithFalseCondition() {
     sql("DELETE FROM %s WHERE id = 1 AND id > 20", commitTarget());
 
     Table table = validationCatalog.loadTable(tableIdent);
-    Assert.assertEquals("Should have 2 snapshots", 2, 
Iterables.size(table.snapshots()));
+    assertThat(table.snapshots()).as("Should have 2 snapshots").hasSize(2);
 
     assertEquals(
         "Should have expected rows",
         ImmutableList.of(row(1, "hr"), row(2, "hardware")),
         sql("SELECT * FROM %s ORDER BY id", selectTarget()));
   }
 
-  @Test
+  @TestTemplate
   public void testDeleteFromEmptyTable() {
-    Assume.assumeFalse("Custom branch does not exist for empty table", 
"test".equals(branch));
+    assumeThat("test".equals(branch)).as("Custom branch does not exist for 
empty table").isFalse();
     createAndInitUnpartitionedTable();
 
     sql("DELETE FROM %s WHERE id IN (1)", commitTarget());
     sql("DELETE FROM %s WHERE dep = 'hr'", commitTarget());
 
     Table table = validationCatalog.loadTable(tableIdent);
-    Assert.assertEquals("Should have 2 snapshots", 2, 
Iterables.size(table.snapshots()));
+    assertThat(table.snapshots()).as("Should have 2 snapshots").hasSize(2);
 
     assertEquals(
         "Should have expected rows",
         ImmutableList.of(),
         sql("SELECT * FROM %s ORDER BY id", selectTarget()));
   }
 
-  @Test
+  @TestTemplate
   public void testDeleteFromNonExistingCustomBranch() {
-    Assume.assumeTrue("Test only applicable to custom branch", 
"test".equals(branch));
+    assumeThat("test".equals(branch)).as("Test only applicable to custom 
branch").isTrue();

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