pvary commented on a change in pull request #2129:
URL: https://github.com/apache/iceberg/pull/2129#discussion_r563665312
##########
File path: mr/src/test/java/org/apache/iceberg/mr/TestCatalogs.java
##########
@@ -138,9 +142,13 @@ public void testCreateDropTableToLocation() throws
IOException {
@Test
public void testCreateDropTableToCatalog() throws IOException {
TableIdentifier identifier = TableIdentifier.of("test", "table");
+ String defaultCatalogName = "default";
+ String warehouseLocation = temp.newFolder("hadoop",
"warehouse").toString();
- conf.set("warehouse.location", temp.newFolder("hadoop",
"warehouse").toString());
- conf.setClass(InputFormatConfig.CATALOG_LOADER_CLASS,
CustomHadoopCatalogLoader.class, CatalogLoader.class);
+ conf.set(String.format(InputFormatConfig.CATALOG_WAREHOUSE_TEMPLATE,
defaultCatalogName), warehouseLocation);
+ conf.set(String.format(InputFormatConfig.CATALOG_CLASS_TEMPLATE,
defaultCatalogName),
+ CustomHadoopCatalog.class.getName());
+ conf.set(String.format(InputFormatConfig.CATALOG_TYPE_TEMPLATE,
defaultCatalogName), Catalogs.CUSTOM);
Review comment:
I see this code several times in the tests. Is it possible to refactor
it to an util class?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]