From a879da2b73457798d9ed520339c76afdc4053c01 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 31 Jul 2013 03:57:08 +0000 Subject: [PATCH] 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 --- .../src/test/org/apache/solr/handler/TestCSVLoader.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); }