tomtongue commented on code in PR #9892: URL: https://github.com/apache/iceberg/pull/9892#discussion_r1517827090
########## core/src/test/java/org/apache/iceberg/TestSnapshotJson.java: ########## @@ -19,23 +19,24 @@ package org.apache.iceberg; import static org.apache.iceberg.Files.localInput; +import static org.assertj.core.api.Assertions.assertThat; import java.io.File; import java.io.IOException; +import java.nio.file.Path; import java.util.List; -import java.util.UUID; import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList; import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestSnapshotJson { - @Rule public TemporaryFolder temp = new TemporaryFolder(); + @TempDir private static Path temp; - public TableOperations ops = new LocalTableOperations(temp); + public TableOperations ops = + new LocalTableOperations(java.nio.file.Files.createTempDirectory(temp, "junit")); + + public TestSnapshotJson() throws IOException {} Review Comment: It doesn't need. As the above comment, I previously set `createTempDirectory` for `LocalTableOperations`, then the `createTempDirectory` needs the `IOException` handling. But as your feedback, `temp` should be set for `LocalTableOperations` and this `IOException` is not needed. Remove in the next commit. ########## core/src/test/java/org/apache/iceberg/TestSnapshotJson.java: ########## @@ -19,23 +19,24 @@ package org.apache.iceberg; import static org.apache.iceberg.Files.localInput; +import static org.assertj.core.api.Assertions.assertThat; import java.io.File; import java.io.IOException; +import java.nio.file.Path; import java.util.List; -import java.util.UUID; import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList; import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestSnapshotJson { - @Rule public TemporaryFolder temp = new TemporaryFolder(); + @TempDir private static Path temp; - public TableOperations ops = new LocalTableOperations(temp); + public TableOperations ops = + new LocalTableOperations(java.nio.file.Files.createTempDirectory(temp, "junit")); + + public TestSnapshotJson() throws IOException {} Review Comment: It doesn't need. As the above comment, I previously set `createTempDirectory` for `LocalTableOperations`, then the `createTempDirectory` needs the `IOException` handling. But as your feedback, `temp` should be set for `LocalTableOperations` and this `IOException` is not needed. Remove it in the next commit. -- 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