dimas-b commented on code in PR #6712:
URL: https://github.com/apache/iceberg/pull/6712#discussion_r1094020382


##########
nessie/src/test/java/org/apache/iceberg/nessie/TestNamespace.java:
##########
@@ -73,6 +77,53 @@ public void testListNamespaces() {
     Assertions.assertThat(namespaces).isNotNull().hasSize(2);
   }
 
+  @Test
+  @NessieApiVersions(versions = NessieApiVersion.V1)
+  public void testNamespacesWithV1Api() {
+    createNamespacesAndTables();
+
+    testListTables();
+
+    List<Namespace> namespaces;
+    namespaces = catalog.listNamespaces(Namespace.of("foo"));
+    // NessieApiV1 should include both implicit and explicit namespaces
+    Assertions.assertThat(namespaces)
+        .isNotNull()
+        .hasSize(2)
+        .containsExactlyInAnyOrder(Namespace.of("foo"), Namespace.of("foo", 
"bar"));
+  }
+
+  @Test
+  @NessieApiVersions(versions = NessieApiVersion.V2)
+  public void testNamespacesWithV2Api() {
+    createNamespacesAndTables();
+
+    testListTables();
+
+    List<Namespace> namespaces;
+    namespaces = catalog.listNamespaces(Namespace.of("foo"));
+    // NessieApiV2 will not list the implicit namespaces
+    Assertions.assertThat(namespaces)
+        .isNotNull()
+        .hasSize(1)

Review Comment:
   nit: `hasSize` is redundant with `isEqualTo` (below)



##########
nessie/src/test/java/org/apache/iceberg/nessie/TestNamespace.java:
##########
@@ -73,6 +77,53 @@ public void testListNamespaces() {
     Assertions.assertThat(namespaces).isNotNull().hasSize(2);
   }
 
+  @Test
+  @NessieApiVersions(versions = NessieApiVersion.V1)
+  public void testNamespacesWithV1Api() {
+    createNamespacesAndTables();
+
+    testListTables();
+
+    List<Namespace> namespaces;
+    namespaces = catalog.listNamespaces(Namespace.of("foo"));
+    // NessieApiV1 should include both implicit and explicit namespaces
+    Assertions.assertThat(namespaces)
+        .isNotNull()
+        .hasSize(2)

Review Comment:
   nit: `hasSize` is redundant with `containsExactlyInAnyOrder` (below)



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