nastra commented on code in PR #10124:
URL: https://github.com/apache/iceberg/pull/10124#discussion_r1562361150
##########
core/src/test/java/org/apache/iceberg/jdbc/TestJdbcCatalog.java:
##########
@@ -161,6 +161,19 @@ public void testInitialize() {
jdbcCatalog.initialize("test_jdbc_catalog", properties);
}
+ @Test
+ public void testDisableInitCatalogTables() {
+ Map<String, String> properties = Maps.newHashMap();
+ properties.put(CatalogProperties.WAREHOUSE_LOCATION,
this.tableDir.toAbsolutePath().toString());
+ properties.put(CatalogProperties.URI,
"jdbc:sqlite:file::memory:?icebergDB");
+ properties.put(JdbcUtil.INIT_CATALOG_TABLES_PROPERTY, "false");
+
+ JdbcCatalog jdbcCatalog = new JdbcCatalog();
+ jdbcCatalog.initialize("test_jdbc_catalog", properties);
+
+ assertThat(jdbcCatalog.getInitializeCatalogTables()).isFalse();
Review Comment:
additionally I think it makes sense to load a namespace or table and assert
that this fails via `assertThatThrownBy(() ->
catalog.load...).isInstanceOf(..).hasMessage(..)`
--
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]