donPain commented on code in PR #16044:
URL: https://github.com/apache/iceberg/pull/16044#discussion_r3120858257


##########
flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestDynamicTableUpdateOperator.java:
##########
@@ -132,6 +139,85 @@ void testDynamicTableUpdateOperatorSchemaChange() throws 
Exception {
     
assertThat(catalog.loadTable(table).schema().schemaId()).isEqualTo(output.schema().schemaId());
   }
 
+  @Test
+  void testCloseOperatorWithNonCloseableCatalog() throws Exception {
+    DynamicTableUpdateOperator operator =
+        new DynamicTableUpdateOperator(
+            CATALOG_EXTENSION.catalogLoader(),
+            10,
+            1000,
+            10,
+            TableCreator.DEFAULT,
+            CASE_SENSITIVE,
+            PRESERVE_COLUMNS);
+    operator.open(null);
+
+    DynamicRecordInternal input =
+        new DynamicRecordInternal(
+            TABLE,
+            "branch",
+            SCHEMA1,
+            GenericRowData.of(1),
+            PartitionSpec.unpartitioned(),
+            42,
+            false,
+            Collections.emptySet());
+    operator.map(input);
+
+    // HadoopCatalog is not Closeable, so close should complete without error
+    operator.close();
+  }

Review Comment:
   Yes, I added that to validate local tests and forgot to remove it, good 
point.



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