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


##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkTableSource.java:
##########
@@ -97,6 +97,7 @@ public void before() {
   public void clean() {
     sql("DROP TABLE IF EXISTS %s.%s", DATABASE_NAME, TABLE_NAME);
     sql("DROP DATABASE IF EXISTS %s", DATABASE_NAME);
+    dropCatalog(CATALOG_NAME, true);
     sql("DROP CATALOG IF EXISTS %s", CATALOG_NAME);

Review Comment:
   I think this line needs to be removed, given that we call dropCatalog above



##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/FlinkTestBase.java:
##########
@@ -113,4 +113,15 @@ protected void assertSameElements(String message, 
Iterable<Row> expected, Iterab
         .as(message)
         .containsExactlyInAnyOrderElementsOf(expected);
   }
+
+  /**
+   * We can not drop currently used catalog after FLINK-29677, so we have make 
sure that we do not use the current
+   * catalog before dropping it. This method switches to the 'default_catalog' 
and drops the one requested.
+   * @param catalogName The catalog to drop
+   * @param ifExist If we should use the 'IF EXISTS' when dropping the catalog
+   */
+  protected void dropCatalog(String catalogName, boolean ifExist) {

Review Comment:
   nit: ifExist -> ifExists



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