nastra commented on code in PR #9401: URL: https://github.com/apache/iceberg/pull/9401#discussion_r1443812461
########## spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/sql/TestNamespaceSQL.java: ########## @@ -18,90 +18,131 @@ */ package org.apache.iceberg.spark.sql; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assumptions.assumeThat; + import java.io.File; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import org.apache.iceberg.Parameter; +import org.apache.iceberg.Parameters; import org.apache.iceberg.catalog.Namespace; import org.apache.iceberg.catalog.TableIdentifier; import org.apache.iceberg.exceptions.NamespaceNotEmptyException; import org.apache.iceberg.relocated.com.google.common.collect.ImmutableSet; import org.apache.iceberg.relocated.com.google.common.collect.Iterables; -import org.apache.iceberg.spark.SparkCatalogTestBase; +import org.apache.iceberg.spark.CatalogTestBase; +import org.apache.iceberg.spark.SparkCatalogConfig; import org.assertj.core.api.Assertions; -import org.junit.After; -import org.junit.Assert; -import org.junit.Assume; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.TestTemplate; -public class TestNamespaceSQL extends SparkCatalogTestBase { +public class TestNamespaceSQL extends CatalogTestBase { private static final Namespace NS = Namespace.of("db"); - private final String fullNamespace; - private final boolean isHadoopCatalog; - - public TestNamespaceSQL(String catalogName, String implementation, Map<String, String> config) { - super(catalogName, implementation, config); - this.fullNamespace = ("spark_catalog".equals(catalogName) ? "" : catalogName + ".") + NS; - this.isHadoopCatalog = "testhadoop".equals(catalogName); + @Parameter(index = 3) + private String fullNamespace; + + @Parameter(index = 4) + private boolean isHadoopCatalog; + + @Parameters( + name = + "catalogName = {0}, implementation = {1}, config = {2}, fullNameSpace = {3}, isHadoopCatalog = {4}") + protected static Object[][] parameters() { + return new Object[][] { + { + SparkCatalogConfig.HIVE.catalogName(), + SparkCatalogConfig.HIVE.implementation(), + SparkCatalogConfig.HIVE.properties(), + "testhive." + NS.toString(), Review Comment: we should probably use `SparkCatalogConfig.HIVE.catalogName()` to construct this. If anyone ever updates the underlying name then this test will start to fail -- 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