You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2023/04/11 14:45:36 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #7320: Nessie: Fix testcase failures

nastra commented on code in PR #7320:
URL: https://github.com/apache/iceberg/pull/7320#discussion_r1162931296


##########
nessie/src/test/java/org/apache/iceberg/nessie/TestMultipleClients.java:
##########
@@ -98,12 +98,12 @@ public void testLoadNamespaceMetadata() {
 
   @Test
   public void testListTables() {
-    catalog.createTable(TableIdentifier.parse("foo.tbl1"), schema);
+    createTable(catalog, TableIdentifier.parse("foo.tbl1"), schema);

Review Comment:
   why not just call `catalog.createNamespace(Namespace.of("foo"), Collections.emptyMap());` at the beginning of these methods? 



##########
nessie/src/test/java/org/apache/iceberg/nessie/TestMultipleClients.java:
##########
@@ -98,12 +98,12 @@ public void testLoadNamespaceMetadata() {
 
   @Test
   public void testListTables() {
-    catalog.createTable(TableIdentifier.parse("foo.tbl1"), schema);
+    createTable(catalog, TableIdentifier.parse("foo.tbl1"), schema);
     Assertions.assertThat(catalog.listTables(Namespace.of("foo")))
         .containsExactlyInAnyOrder(TableIdentifier.parse("foo.tbl1"));
 
     // another client creates a table with the same nessie server
-    anotherCatalog.createTable(TableIdentifier.parse("foo.tbl2"), schema);
+    createTable(anotherCatalog, TableIdentifier.parse("foo.tbl2"), schema);

Review Comment:
   I don't think it's necessary to potentially create the namespace again here. Just calling `catalog.createNamespace(Namespace.of("foo"), Collections.emptyMap());` at the beginning of the method should be enough.
   
   Same applies for the other test methods in this class that 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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org