You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/13 20:02:21 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5737: JdbcCatalog don't override namespace location if set

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


##########
core/src/test/java/org/apache/iceberg/jdbc/TestJdbcCatalog.java:
##########
@@ -630,6 +630,30 @@ public void testCreateNamespaceWithMetadata() {
     Assert.assertTrue(catalog.namespaceExists(testNamespace));
   }
 
+  @Test
+  public void testNamespaceLocation() {
+    Namespace testNamespace = Namespace.of("testDb", "ns1", "ns2");
+
+    // Test with location
+    Map<String, String> testMetadata = ImmutableMap.of();
+    catalog.createNamespace(testNamespace, testMetadata);
+
+    Assert.assertTrue(catalog.loadNamespaceMetadata(testNamespace).containsKey("location"));

Review Comment:
   nit: `Assertions.assertThat(catalog.loadNamespaceMetadata(testNamespace)).containsKey("location")` might be preferrable here imo, because it will print the content of the map if the assertion fails



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