attilakreiner commented on code in PR #10657:
URL: https://github.com/apache/iceberg/pull/10657#discussion_r1670423510
##########
data/src/test/java/org/apache/iceberg/TestSplitScan.java:
##########
@@ -53,38 +51,31 @@ public class TestSplitScan {
private Table table;
private File tableLocation;
-
- @Rule public TemporaryFolder temp = new TemporaryFolder();
private List<Record> expectedRecords;
- @Parameterized.Parameters(name = "format = {0}")
- public static Object[] parameters() {
- return new Object[] {"parquet", "avro"};
+ @Parameters(name = "fileFormat = {0}")
+ public static List<Object> parameters() {
+ return Arrays.asList(FileFormat.PARQUET, FileFormat.AVRO);
}
- private final FileFormat format;
+ @Parameter private FileFormat format;
+ @TempDir private File tempDir;
- public TestSplitScan(String format) {
- this.format = FileFormat.fromString(format);
- }
-
- @Before
+ @BeforeEach
public void before() throws IOException {
- tableLocation = new File(temp.newFolder(), "table");
+ tableLocation = java.nio.file.Files.createTempDirectory(tempDir.toPath(),
"table").toFile();
Review Comment:
It doesn't, we are in the `org.apache.iceberg` package so `Files` will be
resolved to `org.apache.iceberg.Files` that's why we need the full package
name. The other solution is to import `createTempDirectory` as a `static`
import. Pls LMK if I should do that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]