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


##########
flink/v1.18/flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogTable.java:
##########
@@ -523,67 +499,65 @@ public void testAlterTableModifyColumnPosition() {
             "Referenced column `non_existing` by 'AFTER' does not exist in the 
table.");
   }
 
-  @Test
+  @TestTemplate
   public void testAlterTableModifyColumnComment() {
     sql("CREATE TABLE tl(id BIGINT, dt STRING)");
     Schema schemaBefore = table("tl").schema();
-    Assert.assertEquals(
-        new Schema(
-                Types.NestedField.optional(1, "id", Types.LongType.get()),
-                Types.NestedField.optional(2, "dt", Types.StringType.get()))
-            .asStruct(),
-        schemaBefore.asStruct());
+    assertThat(schemaBefore.asStruct())
+        .isEqualTo(
+            new Schema(
+                    Types.NestedField.optional(1, "id", Types.LongType.get()),
+                    Types.NestedField.optional(2, "dt", 
Types.StringType.get()))
+                .asStruct());
 
     sql("ALTER TABLE tl MODIFY (dt STRING COMMENT 'comment for dt field')");
     Schema schemaAfter = table("tl").schema();
-    Assert.assertEquals(
-        new Schema(
-                Types.NestedField.optional(1, "id", Types.LongType.get()),
-                Types.NestedField.optional(2, "dt", Types.StringType.get(), 
"comment for dt field"))
-            .asStruct(),
-        schemaAfter.asStruct());
+    assertThat(schemaAfter.asStruct())
+        .isEqualTo(
+            new Schema(
+                    Types.NestedField.optional(1, "id", Types.LongType.get()),
+                    Types.NestedField.optional(
+                        2, "dt", Types.StringType.get(), "comment for dt 
field"))
+                .asStruct());
   }
 
-  @Test
+  @TestTemplate
   public void testAlterTableConstraint() {
     sql("CREATE TABLE tl(id BIGINT NOT NULL, dt STRING NOT NULL, col1 
STRING)");
     Schema schemaBefore = table("tl").schema();
-    Assert.assertEquals(
-        new Schema(
-                Types.NestedField.required(1, "id", Types.LongType.get()),
-                Types.NestedField.required(2, "dt", Types.StringType.get()),
-                Types.NestedField.optional(3, "col1", Types.StringType.get()))
-            .asStruct(),
-        schemaBefore.asStruct());
-    Assert.assertEquals(ImmutableSet.of(), 
schemaBefore.identifierFieldNames());
-
+    assertThat(schemaBefore.asStruct())
+        .isEqualTo(
+            new Schema(
+                    Types.NestedField.required(1, "id", Types.LongType.get()),
+                    Types.NestedField.required(2, "dt", 
Types.StringType.get()),
+                    Types.NestedField.optional(3, "col1", 
Types.StringType.get()))
+                .asStruct());
+    // Assert.assertEquals(ImmutableSet.of(), 
schemaBefore.identifierFieldNames());
+    assertThat(schemaBefore.identifierFieldNames()).isEmpty();
     sql("ALTER TABLE tl ADD (PRIMARY KEY (id) NOT ENFORCED)");
     Schema schemaAfterAdd = table("tl").schema();
-    Assert.assertEquals(ImmutableSet.of("id"), 
schemaAfterAdd.identifierFieldNames());
-
+    
assertThat(schemaAfterAdd.identifierFieldNames()).isEqualTo(ImmutableSet.of("id"));

Review Comment:
   please also update the other places



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