This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push: new a36d8243 Reuse FileUtils in tests a36d8243 is described below commit a36d8243fe309a99060fc37801e96727cba14852 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Jul 19 12:21:26 2023 -0400 Reuse FileUtils in tests --- src/test/java/org/apache/commons/csv/PerformanceTest.java | 3 ++- src/test/java/org/apache/commons/csv/perf/PerformanceTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/PerformanceTest.java b/src/test/java/org/apache/commons/csv/PerformanceTest.java index ef328c63..c0dff75e 100644 --- a/src/test/java/org/apache/commons/csv/PerformanceTest.java +++ b/src/test/java/org/apache/commons/csv/PerformanceTest.java @@ -33,6 +33,7 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.zip.GZIPInputStream; +import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; /** @@ -82,7 +83,7 @@ public class PerformanceTest { private static final String TEST_RESRC = "org/apache/commons/csv/perf/worldcitiespop.txt.gz"; - private static final File BIG_FILE = new File(System.getProperty("java.io.tmpdir"), "worldcitiespop.txt"); + private static final File BIG_FILE = new File(FileUtils.getTempDirectoryPath(), "worldcitiespop.txt"); private static Reader createReader() throws IOException { return new InputStreamReader(new FileInputStream(BIG_FILE), StandardCharsets.ISO_8859_1); diff --git a/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java b/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java index 6a049881..fcde8984 100644 --- a/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java +++ b/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java @@ -31,6 +31,7 @@ import java.util.zip.GZIPInputStream; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; +import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -45,7 +46,7 @@ public class PerformanceTest { private static final String TEST_RESRC = "org/apache/commons/csv/perf/worldcitiespop.txt.gz"; - private static final File BIG_FILE = new File(System.getProperty("java.io.tmpdir"), "worldcitiespop.txt"); + private static final File BIG_FILE = new File(FileUtils.getTempDirectoryPath(), "worldcitiespop.txt"); @BeforeAll public static void setUpClass() throws FileNotFoundException, IOException { if (BIG_FILE.exists()) {