nastra commented on code in PR #9341: URL: https://github.com/apache/iceberg/pull/9341#discussion_r1434150438
########## spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/data/TestSparkOrcReadMetadataColumns.java: ########## @@ -95,24 +99,20 @@ public class TestSparkOrcReadMetadataColumns { } } - @Parameterized.Parameters(name = "vectorized = {0}") - public static Object[] parameters() { - return new Object[] {false, true}; + @Parameters(name = "vectorized = {0}") + public static Collection<Boolean> parameters() { + return Arrays.asList(false, true); } - @Rule public TemporaryFolder temp = new TemporaryFolder(); + @TempDir private java.nio.file.Path temp; - private boolean vectorized; + @Parameter private boolean vectorized; private File testFile; - public TestSparkOrcReadMetadataColumns(boolean vectorized) { - this.vectorized = vectorized; - } - - @Before + @BeforeEach public void writeFile() throws IOException { - testFile = temp.newFile(); - Assert.assertTrue("Delete should succeed", testFile.delete()); + testFile = File.createTempFile(UUID.randomUUID().toString(), null, temp.toFile()); Review Comment: rather than generating a UUID in every single test it would be better to just use `junit` as the prefix. You could also use `Files.createTempFile(temp, "junit", ...)`, which takes a `Path` as a parameter, so you don't have to call `.toFile()` -- 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