rymurr commented on a change in pull request #1587:
URL: https://github.com/apache/iceberg/pull/1587#discussion_r503395922



##########
File path: 
spark3/src/test/java/org/apache/iceberg/spark/SparkCatalogTestBase.java
##########
@@ -83,12 +90,40 @@ public static void dropWarehouse() {
   protected final SupportsNamespaces validationNamespaceCatalog;
   protected final TableIdentifier tableIdent = 
TableIdentifier.of(Namespace.of("default"), "table");
   protected final String tableName;
+  protected NessieClient client;
+  protected String branch;
 
   public SparkCatalogTestBase(String catalogName, String implementation, 
Map<String, String> config) {
     this.catalogName = catalogName;
-    this.validationCatalog = catalogName.equals("testhadoop") ?
-        new HadoopCatalog(spark.sessionState().newHadoopConf(), "file:" + 
warehouse) :
-        catalog;
+    switch (catalogName) {
+      case "testhadoop":
+        this.validationCatalog = new 
HadoopCatalog(spark.sessionState().newHadoopConf(), "file:" + warehouse);
+        break;
+      case "testnessie":
+        String path = "http://localhost:19121/api/v1";;
+        branch = config.get("nessie_ref");
+        setHadoopConfig(path, branch);
+
+        this.client = new NessieClient(NessieClient.AuthType.NONE, path, null, 
null);
+        try {
+          try {
+            this.client.getTreeApi().createEmptyBranch(branch);

Review comment:
       All Nessie tests are run in their own branch to not interfere with 
parallel test execution




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

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