LUCENE-5154: fix test to use getTempDir instead of CWD

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1508719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-07-31 03:57:08 +00:00
parent 598e546bf4
commit a879da2b73
1 changed files with 6 additions and 2 deletions

View File

@ -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();
}