chinmay-bhat commented on code in PR #9341: URL: https://github.com/apache/iceberg/pull/9341#discussion_r1434164015
########## 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: Removing the UUID. The main problem with using `Files` is that we have another import `import org.apache.iceberg.Files;` that's being used. So I end up writing `java.nio.file.Files.createTempFile(temp, "junit", null).toFile();` which is not as readable as `File.createTempFile("junit", null, temp.toFile());` Which one should I go ahead with? -- 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