ebyhr commented on code in PR #18035:
URL: https://github.com/apache/iceberg/pull/18035#discussion_r3974926934


##########
nessie/src/test/java/org/apache/iceberg/nessie/TestMultipleClients.java:
##########
@@ -111,6 +111,19 @@ public void testListNamespaces() throws 
NessieConflictException, NessieNotFoundE
             "Cannot list child namespaces from 'db1': ref '%s' is no longer 
valid", branch);
   }
 
+  @Test
+  void listNestedNamespacesFromAnotherClient() {
+    // pins the other client to the current ref hash

Review Comment:
   What is the meaning of "pins" in this test? 



##########
nessie/src/test/java/org/apache/iceberg/nessie/TestMultipleClients.java:
##########
@@ -111,6 +111,19 @@ public void testListNamespaces() throws 
NessieConflictException, NessieNotFoundE
             "Cannot list child namespaces from 'db1': ref '%s' is no longer 
valid", branch);
   }
 
+  @Test
+  void listNestedNamespacesFromAnotherClient() {
+    // pins the other client to the current ref hash
+    assertThat(anotherCatalog.listNamespaces()).isEmpty();
+
+    catalog.createNamespace(Namespace.of("db1"), Collections.emptyMap());
+    catalog.createNamespace(Namespace.of("db1", "sub1"), 
Collections.emptyMap());
+
+    // the other client is still on the old ref hash, but listing reads the 
HEAD of the ref
+    assertThat(anotherCatalog.listNamespaces(Namespace.of("db1")))
+        .containsExactlyInAnyOrder(Namespace.of("db1", "sub1"));

Review Comment:
   nit: `containsExactly` is enough to verify the single entry. 



-- 
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: [email protected]

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