Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.Random;
import java.util.concurrent.ConcurrentLinkedQueue;

Expand All @@ -37,7 +36,6 @@
import org.apache.maven.surefire.booter.ForkedNodeArg;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

import static java.nio.channels.Channels.newChannel;
import static java.nio.charset.StandardCharsets.UTF_8;
Expand All @@ -63,12 +61,13 @@
public class CommandChannelDecoderTest {
private static final Random RND = new Random();

@TempDir
Path tempFolder;

@BeforeEach
public void initTmpFile() {
File reportsDir = tempFolder.toFile();
// Not a JUnit @TempDir: the decoder writes .dumpstream files into this directory,
Comment on lines 64 to +66
// and on Windows a freshly written file can be transiently locked (antivirus,
// indexer) right when the @TempDir cleanup runs, failing the whole test class
// with DirectoryNotEmptyException. target/ needs no post-test cleanup.
File reportsDir = new File("target", "decoder-dumps");
String dumpFileName = "surefire-" + RND.nextLong();
DumpErrorSingleton.getSingleton().init(reportsDir, dumpFileName);
}
Expand Down
Loading