This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new bd66d0f548 Nessie: Use custom client builder name (#8798)
bd66d0f548 is described below

commit bd66d0f54802aaf269fe426901d54d69e08c577a
Author: Naveen Kumar <[email protected]>
AuthorDate: Thu Oct 19 17:17:44 2023 +0530

    Nessie: Use custom client builder name (#8798)
---
 .../iceberg/nessie/TestCustomNessieClient.java     | 30 ++++------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git 
a/nessie/src/test/java/org/apache/iceberg/nessie/TestCustomNessieClient.java 
b/nessie/src/test/java/org/apache/iceberg/nessie/TestCustomNessieClient.java
index 85dc3af8b4..2e5be4670b 100644
--- a/nessie/src/test/java/org/apache/iceberg/nessie/TestCustomNessieClient.java
+++ b/nessie/src/test/java/org/apache/iceberg/nessie/TestCustomNessieClient.java
@@ -28,7 +28,6 @@ import org.junit.jupiter.api.Test;
 import 
org.projectnessie.client.NessieClientBuilder.AbstractNessieClientBuilder;
 import org.projectnessie.client.NessieConfigConstants;
 import org.projectnessie.client.api.NessieApi;
-import org.projectnessie.client.http.HttpClientBuilder;
 
 public class TestCustomNessieClient extends BaseTestIceberg {
 
@@ -60,8 +59,8 @@ public class TestCustomNessieClient extends BaseTestIceberg {
             temp.toUri().toString(),
             CatalogProperties.URI,
             uri,
-            NessieConfigConstants.CONF_NESSIE_CLIENT_BUILDER_IMPL,
-            HttpClientBuilder.class.getName(),
+            NessieConfigConstants.CONF_NESSIE_CLIENT_NAME,
+            "HTTP",
             "client-api-version",
             apiVersion));
   }
@@ -78,30 +77,11 @@ public class TestCustomNessieClient extends BaseTestIceberg 
{
                       temp.toUri().toString(),
                       CatalogProperties.URI,
                       uri,
-                      NessieConfigConstants.CONF_NESSIE_CLIENT_BUILDER_IMPL,
-                      "non.existent.ClientBuilderImpl"));
-            })
-        .isInstanceOf(RuntimeException.class)
-        .hasMessageContaining("Cannot load Nessie client builder 
implementation class");
-  }
-
-  @Test
-  public void testCustomClientByImpl() {
-    assertThatThrownBy(
-            () -> {
-              NessieCatalog catalog = new NessieCatalog();
-              catalog.initialize(
-                  "nessie",
-                  ImmutableMap.of(
-                      CatalogProperties.WAREHOUSE_LOCATION,
-                      temp.toUri().toString(),
-                      CatalogProperties.URI,
-                      uri,
-                      NessieConfigConstants.CONF_NESSIE_CLIENT_BUILDER_IMPL,
-                      DummyClientBuilderImpl.class.getName()));
+                      NessieConfigConstants.CONF_NESSIE_CLIENT_NAME,
+                      "non_existent_Client"));
             })
         .isInstanceOf(RuntimeException.class)
-        .hasMessage("BUILD CALLED");
+        .hasMessageContaining("Requested Nessie client named 
non_existent_Client not found");
   }
 
   @Test

Reply via email to