nastra commented on code in PR #9711: URL: https://github.com/apache/iceberg/pull/9711#discussion_r1485808098
########## mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormats.java: ########## @@ -90,52 +93,49 @@ public class TestIcebergInputFormats { private static final PartitionSpec SPEC = PartitionSpec.builderFor(SCHEMA).identity("date").bucket("id", 1).build(); - @Rule public TemporaryFolder temp = new TemporaryFolder(); + @TempDir public Path temp; // before variables private Configuration conf; private TestHelper helper; private InputFormatConfig.ConfigBuilder builder; // parametrized variables - private final TestInputFormat.Factory<Record> testInputFormat; - private final FileFormat fileFormat; + @Parameter(index = 0) + private TestInputFormat.Factory<Record> testInputFormat; + + @Parameter(index = 1) + private FileFormat fileFormat; - @Before + @BeforeEach public void before() throws IOException { conf = new Configuration(); conf.set(CatalogUtil.ICEBERG_CATALOG_TYPE, Catalogs.LOCATION); HadoopTables tables = new HadoopTables(conf); - File location = temp.newFolder(testInputFormat.name(), fileFormat.name()); - Assert.assertTrue(location.delete()); + File location = temp.resolve(Paths.get(testInputFormat.name(), fileFormat.name())).toFile(); Review Comment: in other places we use `Files.createTempDirectory(temp, "junit").toFile()`, so I think we should do the same here -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org