llama90 commented on code in PR #42038:
URL: https://github.com/apache/arrow/pull/42038#discussion_r1633261125
##########
java/adapter/avro/src/test/java/org/apache/arrow/adapter/avro/AvroTestBase.java:
##########
@@ -45,18 +45,17 @@
import org.apache.avro.io.DatumWriter;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.EncoderFactory;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.io.TempDir;
public class AvroTestBase {
- @ClassRule
- public static final TemporaryFolder TMP = new TemporaryFolder();
+ @TempDir
+ public File TMP;
Review Comment:
I understand that in JUnit 5, the alternative for temporary directories is
to use `@TempDir`. So I modified it accordingly.
- [Annotation Interface
TempDir](https://junit.org/junit5/docs/5.10.2/api/org.junit.jupiter.api/org/junit/jupiter/api/io/TempDir.html)
> `@TempDir` can be used to annotate a field in a test class or a parameter
in a lifecycle method or test method of type
[Path](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Path.html)
or
[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)
that should be resolved into a temporary directory.
--
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]