andreoss commented on code in PR #14164:
URL: https://github.com/apache/arrow/pull/14164#discussion_r984783594
##########
java/adapter/avro/src/test/java/org/apache/arrow/AvroTestBase.java:
##########
@@ -45,19 +46,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;
public class AvroTestBase {
- @ClassRule
- public static final TemporaryFolder TMP = new TemporaryFolder();
+ public Path tmp;
protected AvroToArrowConfig config;
- @Before
- public void init() {
+ @BeforeEach
+ void prepare() throws Exception {
+ this.tmp = Files.createTempDirectory("avro");
Review Comment:
@lidavidm Removing such temporary directory is what causing an error on
Windows, the directory is still being used by some thread at the moment of
`@AfterEach`. I suspect there could be a leaked file handler somewhere in the
code, but I don't have a Windows machine to debug this. Polluting the file
system should not be a problem, since OS cleans up temporary storage
periodically.
Or we could keep `@TemporaryFolder` from Junit 4 in these tests until
https://github.com/junit-team/junit5/issues/2811 is resolved
--
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]