kbendick commented on code in PR #4495:
URL: https://github.com/apache/iceberg/pull/4495#discussion_r847714152
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -42,20 +50,29 @@ public void createCatalog() {
File warehouse = temp.toFile();
Configuration conf = new Configuration();
- JdbcCatalog backendCatalog = new JdbcCatalog();
- backendCatalog.setConf(conf);
- Map<String, String> backendCatalogProperties = ImmutableMap.of(
- CatalogProperties.WAREHOUSE_LOCATION, warehouse.getAbsolutePath(),
- CatalogProperties.URI, "jdbc:sqlite:file::memory:?ic" +
UUID.randomUUID().toString().replace("-", ""),
- JdbcCatalog.PROPERTY_PREFIX + "username", "user",
- JdbcCatalog.PROPERTY_PREFIX + "password", "password");
- backendCatalog.initialize("backend", backendCatalogProperties);
+ this.restCatalog = new RESTCatalog((config) -> {
+ JdbcCatalog backendCatalog = new JdbcCatalog();
+ backendCatalog.setConf(conf);
+ Map<String, String> backendCatalogProperties = ImmutableMap.of(
+ CatalogProperties.WAREHOUSE_LOCATION, warehouse.getAbsolutePath(),
+ CatalogProperties.URI, "jdbc:sqlite:file::memory:?ic" +
UUID.randomUUID().toString().replace("-", ""),
+ JdbcCatalog.PROPERTY_PREFIX + "username", "user",
+ JdbcCatalog.PROPERTY_PREFIX + "password", "password");
Review Comment:
Yeah that would be fine. I had it that way at one point in time (but never
pushed it), so let me get it back that way again.
--
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]