diff --git a/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java b/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java index b722929527c..1f31d418f54 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java +++ b/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java @@ -17,6 +17,7 @@ package org.apache.solr.handler; +import org.apache.lucene.util._TestUtil; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.common.params.CommonParams; @@ -39,9 +40,9 @@ public class TestCSVLoader extends SolrTestCaseJ4 { initCore("solrconfig.xml","schema12.xml"); } - String filename = "solr_tmp.csv"; + String filename; String def_charset = "UTF-8"; - File file = new File(filename); + File file; @Override @Before @@ -49,6 +50,9 @@ public class TestCSVLoader extends SolrTestCaseJ4 { // if you override setUp or tearDown, you better call // the super classes version super.setUp(); + File tempDir = _TestUtil.getTempDir("TestCSVLoader"); + file = new File(tempDir, "solr_tmp.csv"); + filename = file.getPath(); cleanup(); }