diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java index 765922201e18..9dac1a64e2c0 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java @@ -106,13 +106,13 @@ protected QueryRunner createQueryRunner() public void registerTables() { for (ResourceTable table : Iterables.concat(PERSON_TABLES, OTHER_TABLES)) { - String dataPath = getTableLocation(table.resourcePath()).toExternalForm(); + String dataPath = getResourceLocation(table.resourcePath()).toExternalForm(); getQueryRunner().execute( format("CALL system.register_table('%s', '%s', '%s')", getSession().getSchema().orElseThrow(), table.tableName(), dataPath)); } } - private URL getTableLocation(String resourcePath) + private URL getResourceLocation(String resourcePath) { return getClass().getClassLoader().getResource(resourcePath); } @@ -656,7 +656,7 @@ public void testCorruptedExternalTableLocation() // create a bad_person table which is based on person table in temporary location String tableName = "bad_person_" + randomNameSuffix(); Path tableLocation = Files.createTempFile(tableName, null); - copyDirectoryContents(Path.of(getTableLocation("databricks73/person").toURI()), tableLocation); + copyDirectoryContents(Path.of(getResourceLocation("databricks73/person").toURI()), tableLocation); getQueryRunner().execute( format("CALL system.register_table('%s', '%s', '%s')", getSession().getSchema().orElseThrow(), tableName, tableLocation)); testCorruptedTableLocation(tableName, tableLocation, false);