lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1582571 [2/3] - in /lucene/dev/branches/solr5914: ./ lucene/test-framework/src/java/org/apache/lucene/util/ solr/ solr/contrib/ solr/contrib/analysis-extras/src/test/org/apache/solr/schema/ solr/contrib/dataimporthandler/src/test/org/apach...
Date Fri, 28 Mar 2014 00:55:47 GMT
Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java Fri Mar 28 00:55:45 2014
@@ -50,7 +50,7 @@ public class ZkControllerTest extends So
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    createTempDir();
+
   }
 
   @AfterClass
@@ -81,7 +81,7 @@ public class ZkControllerTest extends So
                  ZkController.generateNodeName("foo-bar", "77", "/solr/sub_dir/"));
 
     // setup a SolrZkClient to do some getBaseUrlForNodeName testing
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
 
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -152,7 +152,7 @@ public class ZkControllerTest extends So
 
   @Test
   public void testReadConfigName() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     CoreContainer cc = null;
 
@@ -208,7 +208,7 @@ public class ZkControllerTest extends So
 
   @Test
   public void testUploadToCloud() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
 
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -261,7 +261,7 @@ public class ZkControllerTest extends So
 
   @Test
   public void testGetHostName() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     CoreContainer cc = null;
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java Fri Mar 28 00:55:45 2014
@@ -40,7 +40,7 @@ public class ZkSolrClientTest extends Ab
   }
   
   public void testConnect() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = null;
 
@@ -54,7 +54,7 @@ public class ZkSolrClientTest extends Ab
   }
 
   public void testMakeRootNode() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = null;
 
@@ -73,7 +73,7 @@ public class ZkSolrClientTest extends Ab
   }
   
   public void testClean() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = null;
 
@@ -99,7 +99,7 @@ public class ZkSolrClientTest extends Ab
   }
 
   public void testReconnect() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = null;
     SolrZkClient zkClient = null;
@@ -193,7 +193,7 @@ public class ZkSolrClientTest extends Ab
   }
 
   public void testWatchChildren() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     
     final AtomicInteger cnt = new AtomicInteger();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java Fri Mar 28 00:55:45 2014
@@ -21,7 +21,6 @@ import java.io.IOException;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.cloud.BasicDistributedZk2Test;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -38,7 +37,7 @@ public class HdfsBasicDistributedZk2Test
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -39,7 +39,7 @@ public class HdfsBasicDistributedZkTest 
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java Fri Mar 28 00:55:45 2014
@@ -21,7 +21,6 @@ import java.io.IOException;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.cloud.ChaosMonkeySafeLeaderTest;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -39,7 +38,7 @@ public class HdfsChaosMonkeySafeLeaderTe
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsCollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsCollectionsAPIDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsCollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsCollectionsAPIDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -17,11 +17,9 @@ package org.apache.solr.cloud.hdfs;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.cloud.CollectionsAPIDistributedZkTest;
 import org.junit.AfterClass;
@@ -39,7 +37,7 @@ public class HdfsCollectionsAPIDistribut
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
     
     System.setProperty("solr.hdfs.home", dfsCluster.getURI().toString() + "/solr");
     System.setProperty("solr.hdfs.blockcache.enabled", "false");

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java Fri Mar 28 00:55:45 2014
@@ -17,7 +17,6 @@ package org.apache.solr.cloud.hdfs;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
@@ -38,7 +37,7 @@ public class HdfsRecoveryZkTest extends 
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
     System.setProperty("solr.hdfs.blockcache.blocksperbank", "2048");
   }
   

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java Fri Mar 28 00:55:45 2014
@@ -17,9 +17,7 @@ package org.apache.solr.cloud.hdfs;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
-import java.util.Locale;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.lucene.util.LuceneTestCase.Slow;
@@ -40,7 +38,7 @@ public class HdfsSyncSliceTest extends S
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java Fri Mar 28 00:55:45 2014
@@ -39,12 +39,10 @@ public class HdfsTestUtil {
   
   private static Map<MiniDFSCluster,Timer> timers = new ConcurrentHashMap<>();
 
-  public static MiniDFSCluster setupClass() throws Exception {
+  public static MiniDFSCluster setupClass(String dir) throws Exception {
     LuceneTestCase.assumeFalse("HDFS tests were disabled by -Dtests.disableHdfs",
       Boolean.parseBoolean(System.getProperty("tests.disableHdfs", "false")));
 
-    File dir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-
     savedLocale = Locale.getDefault();
     // TODO: we HACK around HADOOP-9643
     Locale.setDefault(Locale.ENGLISH);
@@ -55,12 +53,12 @@ public class HdfsTestUtil {
     conf.set("dfs.block.access.token.enable", "false");
     conf.set("dfs.permissions.enabled", "false");
     conf.set("hadoop.security.authentication", "simple");
-    conf.set("hdfs.minidfs.basedir", dir.getAbsolutePath() + File.separator + "hdfsBaseDir");
-    conf.set("dfs.namenode.name.dir", dir.getAbsolutePath() + File.separator + "nameNodeNameDir");
+    conf.set("hdfs.minidfs.basedir", dir + File.separator + "hdfsBaseDir");
+    conf.set("dfs.namenode.name.dir", dir + File.separator + "nameNodeNameDir");
     
     
-    System.setProperty("test.build.data", dir.getAbsolutePath() + File.separator + "hdfs" + File.separator + "build");
-    System.setProperty("test.cache.data", dir.getAbsolutePath() + File.separator + "hdfs" + File.separator + "cache");
+    System.setProperty("test.build.data", dir + File.separator + "hdfs" + File.separator + "build");
+    System.setProperty("test.cache.data", dir + File.separator + "hdfs" + File.separator + "cache");
     System.setProperty("solr.lock.type", "hdfs");
     
     System.setProperty("solr.hdfs.home", "/solr_hdfs_home");

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -17,12 +17,9 @@ package org.apache.solr.cloud.hdfs;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.cloud.UnloadDistributedZkTest;
 import org.junit.AfterClass;
@@ -40,7 +37,7 @@ public class HdfsUnloadDistributedZkTest
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java Fri Mar 28 00:55:45 2014
@@ -17,7 +17,6 @@
 
 package org.apache.solr.cloud.hdfs;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -26,8 +25,6 @@ import java.util.List;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.store.NRTCachingDirectory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -62,7 +59,7 @@ public class HdfsWriteToMultipleCollecti
   @BeforeClass
   public static void setupClass() throws Exception {
     schemaString = "schema15.xml";      // we need a string id
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
     System.setProperty(SOLR_HDFS_HOME, dfsCluster.getURI().toString() + "/solr");
   }
   

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java Fri Mar 28 00:55:45 2014
@@ -17,7 +17,6 @@
 
 package org.apache.solr.cloud.hdfs;
 
-import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -32,7 +31,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
@@ -63,7 +61,7 @@ public class StressHdfsTest extends Basi
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
     System.setProperty("solr.hdfs.home", dfsCluster.getURI().toString() + "/solr");
   }
   

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java Fri Mar 28 00:55:45 2014
@@ -24,8 +24,6 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.junit.After;
@@ -37,9 +35,7 @@ public class CoreContainerCoreInitFailur
   CoreContainer cc = null;
 
   private void init(final String dirSuffix) {
-    // would be nice to do this in an @Before method,
-    // but junit doesn't let @Before methods have test names
-    solrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + dirSuffix);
+    solrHome = createTempDir(dirSuffix);
   }
 
   @After

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java Fri Mar 28 00:55:45 2014
@@ -30,8 +30,6 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
@@ -87,7 +85,9 @@ public class OpenCloseCoreStressTest ext
     coreNames = new ArrayList<>();
     cumulativeDocs = 0;
 
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    solrHomeDirectory = createTempDir();
+    FileUtils.deleteDirectory(solrHomeDirectory); // Ensure that a failed test didn't leave something lying around.
+
     jetty = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0, null, null, true, null, sslConfig);
   }
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java Fri Mar 28 00:55:45 2014
@@ -17,20 +17,19 @@ package org.apache.solr.core;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.util.Map;
+
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.store.NativeFSLockFactory;
 import org.apache.lucene.store.SimpleFSLockFactory;
-import org.apache.lucene.util.Version;
 import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.io.File;
-import java.util.Map;
-
 public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 {
 
   @Override
@@ -40,11 +39,8 @@ public class SolrCoreCheckLockOnStartupT
 
     System.setProperty("solr.directoryFactory", "org.apache.solr.core.SimpleFSDirectoryFactory");
 
-    //explicitly creates the temp dataDir so we know where the index will be located
-    createTempDir();
-
     IndexWriterConfig indexWriterConfig = new IndexWriterConfig(TEST_VERSION_CURRENT, null);
-    Directory directory = newFSDirectory(new File(dataDir, "index"));
+    Directory directory = newFSDirectory(new File(createTempDir(), "index"));
     //creates a new index on the known location
     new IndexWriter(
         directory,
@@ -56,7 +52,7 @@ public class SolrCoreCheckLockOnStartupT
   @Test
   public void testSimpleLockErrorOnStartup() throws Exception {
 
-    Directory directory = newFSDirectory(new File(dataDir, "index"), new SimpleFSLockFactory());
+    Directory directory = newFSDirectory(new File(initCoreDataDir, "index"), new SimpleFSLockFactory());
     //creates a new IndexWriter without releasing the lock yet
     IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(TEST_VERSION_CURRENT, null));
 
@@ -80,7 +76,7 @@ public class SolrCoreCheckLockOnStartupT
   @Test
   public void testNativeLockErrorOnStartup() throws Exception {
 
-    File indexDir = new File(dataDir, "index");
+    File indexDir = new File(initCoreDataDir, "index");
     log.info("Acquiring lock on {}", indexDir.getAbsolutePath());
     Directory directory = newFSDirectory(indexDir, new NativeFSLockFactory());
     //creates a new IndexWriter without releasing the lock yet

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java Fri Mar 28 00:55:45 2014
@@ -17,10 +17,19 @@
 
 package org.apache.solr.core;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.handler.RequestHandlerBase;
-import org.apache.solr.handler.component.SpellCheckComponent;
 import org.apache.solr.handler.component.QueryComponent;
+import org.apache.solr.handler.component.SpellCheckComponent;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrRequestHandler;
 import org.apache.solr.response.SolrQueryResponse;
@@ -29,16 +38,6 @@ import org.apache.solr.util.DefaultSolrT
 import org.apache.solr.util.plugin.SolrCoreAware;
 import org.junit.Test;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
 public class SolrCoreTest extends SolrTestCaseJ4 {
   private static final String COLLECTION1 = "collection1";
   
@@ -67,8 +66,7 @@ public class SolrCoreTest extends SolrTe
     core.close();
     
     
-    SolrCore newCore = new SolrCore(COLLECTION1, dataDir + File.separator
-        + "datadir2", new SolrConfig("solr/collection1", "solrconfig.xml", null), schema,
+    SolrCore newCore = new SolrCore(COLLECTION1, createTempDir("dataDir2").getAbsolutePath(), new SolrConfig("solr/collection1", "solrconfig.xml", null), schema,
         new CoreDescriptor(cores, COLLECTION1, "solr/collection1"));
     
     cores.register(newCore, false);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java Fri Mar 28 00:55:45 2014
@@ -73,10 +73,11 @@ public class TestArbitraryIndexDir exten
   @Override
   public void setUp() throws Exception {
     super.setUp();
+    
+    File tmpDataDir = createTempDir();
 
-    dataDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
     solrConfig = TestHarness.createConfig(getSolrHome(), "solrconfig.xml");
-    h = new TestHarness( dataDir.getAbsolutePath(),
+    h = new TestHarness( tmpDataDir.getAbsolutePath(),
         solrConfig,
         "schema12.xml");
     lrf = h.getRequestFactory

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestConfigSets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestConfigSets.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestConfigSets.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestConfigSets.java Fri Mar 28 00:55:45 2014
@@ -26,8 +26,6 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Rule;
 import org.junit.Test;
@@ -44,7 +42,9 @@ public class TestConfigSets extends Solr
   public static String solrxml = "<solr><str name=\"configSetBaseDir\">${configsets:configsets}</str></solr>";
 
   public CoreContainer setupContainer(String testName, String configSetsBaseDir) {
-    File testDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + "-" + testName);
+    File testDirectory = new File(createTempDir(), testName);
+    testDirectory.mkdirs();
+
     System.setProperty("configsets", configSetsBaseDir);
 
     SolrResourceLoader loader = new SolrResourceLoader(testDirectory.getAbsolutePath());
@@ -95,7 +95,8 @@ public class TestConfigSets extends Solr
 
   @Test
   public void testConfigSetOnCoreReload() throws IOException {
-    File testDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + "-core-reload");
+    File testDirectory = new File(initCoreDataDir, "core-reload");
+    testDirectory.mkdirs();
     File configSetsDir = new File(testDirectory, "configsets");
 
     FileUtils.copyDirectory(getFile("solr/configsets"), configSetsDir);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java Fri Mar 28 00:55:45 2014
@@ -69,7 +69,7 @@ public class TestCoreContainer extends S
 
   private CoreContainer init(String dirName) throws Exception {
 
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + dirName);
+    solrHomeDirectory = createTempDir(dirName);
 
     FileUtils.copyDirectory(new File(SolrTestCaseJ4.TEST_HOME()), solrHomeDirectory);
     System.out.println("Using solrconfig from " + new File(SolrTestCaseJ4.TEST_HOME()).getAbsolutePath());
@@ -148,7 +148,7 @@ public class TestCoreContainer extends S
   @Test
   public void testNoCores() throws IOException, ParserConfigurationException, SAXException {
     //create solrHome
-    File solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + "_noCores");
+    File solrHomeDirectory = createTempDir();
     
     boolean oldSolrXml = random().nextBoolean();
     

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java Fri Mar 28 00:55:45 2014
@@ -25,8 +25,6 @@ import java.util.Properties;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.junit.After;
@@ -40,10 +38,9 @@ public class TestCoreDiscovery extends S
     initCore();
   }
 
-  private File solrHomeDirectory;
+  private final File solrHomeDirectory = createTempDir();
 
   private void setMeUp(String alternateCoreDir) throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()); 
     System.setProperty("solr.solr.home", solrHomeDirectory.getAbsolutePath());
     String xmlStr = SOLR_XML;
     if (alternateCoreDir != null) {
@@ -196,7 +193,9 @@ public class TestCoreDiscovery extends S
 
   @Test
   public void testAlternateCoreDir() throws Exception {
-    File alt = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+
+    File alt = createTempDir();
+
     setMeUp(alt.getAbsolutePath());
     addCoreWithProps(makeCorePropFile("core1", false, true, "dataDir=core1"),
         new File(alt, "core1" + File.separator + CorePropertiesLocator.PROPERTIES_FILENAME));
@@ -214,7 +213,7 @@ public class TestCoreDiscovery extends S
   }
   @Test
   public void testNoCoreDir() throws Exception {
-    File noCoreDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File noCoreDir = new File(createTempDir(), "noCoreDir");
     setMeUp(noCoreDir.getAbsolutePath());
     addCoreWithProps(makeCorePropFile("core1", false, true),
         new File(noCoreDir, "core1" + File.separator + CorePropertiesLocator.PROPERTIES_FILENAME));

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestLazyCores.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestLazyCores.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestLazyCores.java Fri Mar 28 00:55:45 2014
@@ -29,8 +29,6 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CoreAdminParams;
@@ -43,7 +41,7 @@ import org.apache.solr.update.AddUpdateC
 import org.apache.solr.update.CommitUpdateCommand;
 import org.apache.solr.update.UpdateHandler;
 import org.apache.solr.util.TestHarness;
-import org.junit.After;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -55,9 +53,16 @@ public class TestLazyCores extends SolrT
   }
 
   private File solrHomeDirectory;
+  
+  @Before
+  @Override
+  public void setUp() throws Exception {
+    super.setUp();
+  }
 
   private CoreContainer init() throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    solrHomeDirectory = createTempDir();
+    
     for (int idx = 1; idx < 10; ++idx) {
       copyMinConf(new File(solrHomeDirectory, "collection" + idx));
     }
@@ -75,13 +80,7 @@ public class TestLazyCores extends SolrT
     cores.load();
     return cores;
   }
-
-  @After
-  public void after() throws Exception {
-    if (solrHomeDirectory.exists()) {
-      FileUtils.deleteDirectory(solrHomeDirectory);
-    }
-  }
+  
   @Test
   public void testLazyLoad() throws Exception {
     CoreContainer cc = init();
@@ -500,13 +499,13 @@ public class TestLazyCores extends SolrT
       // Did we get the expected message for each of the cores that failed to load? Make sure we don't run afoul of
       // the dreaded slash/backslash difference on Windows and *nix machines.
       testMessage(cc.getCoreInitFailures(),
-          "TestLazyCores" + File.separator + "badConfig1" + File.separator + "solrconfig.xml");
+          "badConfig1" + File.separator + "solrconfig.xml");
       testMessage(cc.getCoreInitFailures(),
-          "TestLazyCores" + File.separator + "badConfig2" + File.separator + "solrconfig.xml");
+          "badConfig2" + File.separator + "solrconfig.xml");
       testMessage(cc.getCoreInitFailures(),
-          "TestLazyCores" + File.separator + "badSchema1" + File.separator + "schema.xml");
+          "badSchema1" + File.separator + "schema.xml");
       testMessage(cc.getCoreInitFailures(),
-          "TestLazyCores" + File.separator + "badSchema2" + File.separator + "schema.xml");
+          "badSchema2" + File.separator + "schema.xml");
 
       // Status should report that there are failure messages for the bad cores and none for the good cores.
       checkStatus(cc, true, "core1");
@@ -589,15 +588,11 @@ public class TestLazyCores extends SolrT
   private CoreContainer initGoodAndBad(List<String> goodCores,
                                        List<String> badSchemaCores,
                                        List<String> badConfigCores) throws Exception {
-
+    solrHomeDirectory = createTempDir();
+    
     // Don't pollute the log with exception traces when they're expected.
     ignoreException(Pattern.quote("SAXParseException"));
-
-    if (solrHomeDirectory.exists()) {
-      FileUtils.deleteDirectory(solrHomeDirectory);
-    }
-    assertTrue("Failed to mkdirs workDir", solrHomeDirectory.mkdirs());
-
+    
     // Create the cores that should be fine.
     for (String coreName : goodCores) {
       File coreRoot = new File(solrHomeDirectory, coreName);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNRTOpen.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNRTOpen.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNRTOpen.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNRTOpen.java Fri Mar 28 00:55:45 2014
@@ -46,10 +46,10 @@ public class TestNRTOpen extends SolrTes
     // add a doc
     assertU(adoc("foo", "bar"));
     assertU(commit());
-    File myDir = dataDir;
+    File myDir = initCoreDataDir;
     deleteCore();
     // boot up again over the same index
-    dataDir = myDir;
+    initCoreDataDir = myDir;
     initCore("solrconfig-basic.xml", "schema-minimal.xml");
     // startup
     assertNRT(1);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNonNRTOpen.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNonNRTOpen.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNonNRTOpen.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNonNRTOpen.java Fri Mar 28 00:55:45 2014
@@ -51,10 +51,10 @@ public class TestNonNRTOpen extends Solr
     // add a doc
     assertU(adoc("foo", "bar"));
     assertU(commit());
-    File myDir = dataDir;
+    File myDir = initCoreDataDir;
     deleteCore();
     // boot up again over the same index
-    dataDir = myDir;
+    initCoreDataDir = myDir;
     initCore("solrconfig-basic.xml", "schema-minimal.xml");
     // startup
     assertNotNRT(1);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXMLSerializer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXMLSerializer.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXMLSerializer.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXMLSerializer.java Fri Mar 28 00:55:45 2014
@@ -17,23 +17,6 @@ package org.apache.solr.core;
  * limitations under the License.
  */
 
-import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
-import org.apache.solr.core.SolrXMLSerializer.SolrCoreXMLDef;
-import org.apache.solr.core.SolrXMLSerializer.SolrXMLDef;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
 import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.File;
@@ -46,8 +29,26 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.core.SolrXMLSerializer.SolrCoreXMLDef;
+import org.apache.solr.core.SolrXMLSerializer.SolrXMLDef;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
 
-public class TestSolrXMLSerializer extends LuceneTestCase {
+public class TestSolrXMLSerializer extends SolrTestCaseJ4 {
   private static final XPathFactory xpathFactory = XPathFactory.newInstance();
   private static final String defaultCoreNameKey = "defaultCoreName";
   private static final String defaultCoreNameVal = "collection1";
@@ -81,7 +82,7 @@ public class TestSolrXMLSerializer exten
     assertResults(((StringWriter) w).getBuffer().toString().getBytes("UTF-8"));
     
     // again with default file
-    File tmpFile = TestUtil.createTempFile("solr.xml", null);
+    File tmpFile = TestUtil.createTempFile("solr.xml", null, createTempDir());
     
     serializer.persistFile(tmpFile, solrXMLDef);
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXml.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXml.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXml.java Fri Mar 28 00:55:45 2014
@@ -21,10 +21,7 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
-import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
@@ -37,12 +34,7 @@ public class TestSolrXml extends SolrTes
   @Rule
   public TestRule solrTestRules = RuleChain.outerRule(new SystemPropertiesRestoreRule());
 
-  private File solrHome;
-  
-  @Before
-  public void setupTest() {
-    solrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-  }
+  private final File solrHome = createTempDir();
 
   @Test
   public void testAllInfoPresent() throws IOException {

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java Fri Mar 28 00:55:45 2014
@@ -57,7 +57,7 @@ import com.google.common.base.Charsets;
 
 public class TestSolrXmlPersistence extends SolrTestCaseJ4 {
 
-  private File solrHomeDirectory;
+  private File solrHomeDirectory = createTempDir();
 
   @Rule
   public TestRule solrTestRules =
@@ -69,8 +69,6 @@ public class TestSolrXmlPersistence exte
   }
 
   private CoreContainer init(String solrXmlString, String... subDirs) throws Exception {
-    createTempDir();
-    solrHomeDirectory = dataDir;
 
     for (String s : subDirs) {
       copyMinConf(new File(solrHomeDirectory, s));

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java Fri Mar 28 00:55:45 2014
@@ -22,8 +22,6 @@ import java.io.IOException;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Test;
 
@@ -64,7 +62,8 @@ public class TestSolrXmlPersistor  exten
 
     final String solrxml = "<solr><cores></cores></solr>";
 
-    final File solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    final File solrHomeDirectory = createTempDir();
+
     try {
       if (solrHomeDirectory.exists()) {
         FileUtils.deleteDirectory(solrHomeDirectory);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java Fri Mar 28 00:55:45 2014
@@ -17,23 +17,17 @@
 
 package org.apache.solr.handler;
 
-import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileReader;
 import java.io.IOException;
 
-import org.apache.lucene.util.TestUtil;
+import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
-
-import org.apache.commons.io.FileUtils;
-
 import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 
 public class PingRequestHandlerTest extends SolrTestCaseJ4 {
 
@@ -48,14 +42,14 @@ public class PingRequestHandlerTest exte
 
   @Before
   public void before() throws IOException {
-
+    File tmpDir = initCoreDataDir;
     // by default, use relative file in dataDir
-    healthcheckFile = new File(dataDir, fileName);
+    healthcheckFile = new File(tmpDir, fileName);
     String fileNameParam = fileName;
 
     // sometimes randomly use an absolute File path instead 
     if (random().nextBoolean()) {
-      healthcheckFile = TestUtil.createTempFile(fileName, "");
+      healthcheckFile = new File(tmpDir, fileName);
       fileNameParam = healthcheckFile.getAbsolutePath();
     } 
       
@@ -85,9 +79,10 @@ public class PingRequestHandlerTest exte
     assertEquals("OK", rsp.getValues().get("status")); 
 
   }
+  
   public void testEnablingServer() throws Exception {
 
-    assertTrue(! healthcheckFile.exists());
+    assertTrue(!healthcheckFile.exists());
 
     // first make sure that ping responds back that the service is disabled
     SolrQueryResponse sqr = makeRequest(handler, req());

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Fri Mar 28 00:55:45 2014
@@ -1595,7 +1595,9 @@ public class TestReplicationHandler exte
       System.setProperty("solr.test.sys.prop1", "propone");
       System.setProperty("solr.test.sys.prop2", "proptwo");
 
-      File home = TestUtil.createTempDir(getClass().getName());
+      File home = new File(dataDir, 
+                           getClass().getName() + "-" + 
+                           System.currentTimeMillis());
 
       homeDir = new File(home, name);
       dataDir = new File(homeDir + "/collection1", "data");

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminCreateDiscoverTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminCreateDiscoverTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminCreateDiscoverTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminCreateDiscoverTest.java Fri Mar 28 00:55:45 2014
@@ -17,9 +17,14 @@
 
 package org.apache.solr.handler.admin;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CoreAdminParams;
@@ -30,12 +35,6 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.Properties;
-
 public class CoreAdminCreateDiscoverTest extends SolrTestCaseJ4 {
 
   private static File solrHomeDirectory = null;
@@ -50,7 +49,7 @@ public class CoreAdminCreateDiscoverTest
   public static void beforeClass() throws Exception {
     useFactory(null); // I require FS-based indexes for this test.
 
-    solrHomeDirectory = TestUtil.createTempDir(CoreAdminCreateDiscoverTest.getClassName());
+    solrHomeDirectory = createTempDir();
     if (solrHomeDirectory.exists()) {
       FileUtils.deleteDirectory(solrHomeDirectory);
     }

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java Fri Mar 28 00:55:45 2014
@@ -22,8 +22,6 @@ import java.util.Map;
 
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
@@ -61,7 +59,7 @@ public class CoreAdminHandlerTest extend
   public void testCreateWithSysVars() throws Exception {
     useFactory(null); // I require FS-based indexes for this test.
 
-    final File workDir = TestUtil.createTempDir(getCoreName());
+    final File workDir = createTempDir(getCoreName());
 
     String coreName = "with_sys_vars";
     File instDir = new File(workDir, coreName);
@@ -132,7 +130,7 @@ public class CoreAdminHandlerTest extend
 
   @Test
   public void testCoreAdminHandler() throws Exception {
-    final File workDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    final File workDir = new File(initCoreDataDir, this.getClass().getName());
 
     if (workDir.exists()) {
       FileUtils.deleteDirectory(workDir);
@@ -223,7 +221,9 @@ public class CoreAdminHandlerTest extend
 
   @Test
   public void testDeleteInstanceDir() throws Exception  {
-    File solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File solrHomeDirectory = new File(initCoreDataDir, getClass().getName() + "-corex-"
+        + System.currentTimeMillis());
+    solrHomeDirectory.mkdirs();
     copySolrHomeToTemp(solrHomeDirectory, "corex", true);
     File corex = new File(solrHomeDirectory, "corex");
     FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminRequestStatusTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminRequestStatusTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminRequestStatusTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminRequestStatusTest.java Fri Mar 28 00:55:45 2014
@@ -20,8 +20,6 @@ package org.apache.solr.handler.admin;
 import java.io.File;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.params.CoreAdminParams;
 import org.apache.solr.core.CoreContainer;
@@ -39,7 +37,8 @@ public class CoreAdminRequestStatusTest 
 
   @Test
   public void testCoreAdminRequestStatus() throws Exception {
-    final File workDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    final File workDir = createTempDir();
+
     final CoreContainer cores = h.getCoreContainer();
 
     final CoreAdminHandler admin = new CoreAdminHandler(cores);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreMergeIndexesAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreMergeIndexesAdminHandlerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreMergeIndexesAdminHandlerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreMergeIndexesAdminHandlerTest.java Fri Mar 28 00:55:45 2014
@@ -71,7 +71,7 @@ public class CoreMergeIndexesAdminHandle
 
   @Test
   public void testMergeIndexesCoreAdminHandler() throws Exception {
-    final File workDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    final File workDir = createTempDir();
 
     if (workDir.exists()) {
       FileUtils.deleteDirectory(workDir);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java Fri Mar 28 00:55:45 2014
@@ -49,7 +49,7 @@ public class DistributedDebugComponentTe
   }
   
   private static File createSolrHome() throws Exception {
-    File workDir = TestUtil.createTempDir(DistributedDebugComponentTest.class.getName());
+    File workDir = new File(createTempDir(), DistributedDebugComponentTest.class.getName());
     setupJettyTestHome(workDir, "collection1");
     FileUtils.copyDirectory(new File(workDir, "collection1"), new File(workDir, "collection2"));
     return workDir;

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java Fri Mar 28 00:55:45 2014
@@ -23,6 +23,7 @@ import java.util.List;
 
 import junit.framework.Assert;
 
+import org.apache.solr.SolrTestCaseJ4.SuppressTempDirCleanUp;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.client.solrj.SolrServer;
@@ -40,6 +41,7 @@ import org.junit.BeforeClass;
  * @see org.apache.solr.handler.component.SpellCheckComponent
  */
 @Slow
+@SuppressTempDirCleanUp(bugUrl = "https://issues.apache.org/jira/browse/SOLR-1877 Spellcheck IndexReader leak bug?")
 public class DistributedSpellCheckComponentTest extends BaseDistributedSearchTestCase {
   
   public DistributedSpellCheckComponentTest()

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java Fri Mar 28 00:55:45 2014
@@ -57,10 +57,9 @@ public class QueryElevationComponentTest
 
   private void init(String config, String schema) throws Exception {
     //write out elevate-data.xml to the Data dir first by copying it from conf, which we know exists, this way we can test both conf and data configurations
-    createTempDir();
     File parent = new File(TEST_HOME() + "/collection1", "conf");
     File elevateFile = new File(parent, "elevate.xml");
-    File elevateDataFile = new File(dataDir, "elevate-data.xml");
+    File elevateDataFile = new File(initCoreDataDir, "elevate-data.xml");
     FileUtils.copyFile(elevateFile, elevateDataFile);
 
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java Fri Mar 28 00:55:45 2014
@@ -22,8 +22,6 @@ import java.util.TreeMap;
 import java.util.regex.Pattern;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.util.RestTestBase;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.After;
@@ -42,8 +40,7 @@ public class TestManagedSchemaFieldResou
 
   @Before
   public void before() throws Exception {
-    createTempDir();
-    tmpSolrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    tmpSolrHome = createTempDir();
     tmpConfDir = new File(tmpSolrHome, confDir);
     FileUtils.copyDirectory(new File(TEST_HOME()), tmpSolrHome.getAbsoluteFile());
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedStopFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedStopFilterFactory.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedStopFilterFactory.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedStopFilterFactory.java Fri Mar 28 00:55:45 2014
@@ -46,8 +46,8 @@ public class TestManagedStopFilterFactor
 
   @Before
   public void before() throws Exception {
-    createTempDir();
-    tmpSolrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    tmpSolrHome = new File(createTempDir() + File.separator + TestManagedStopFilterFactory.class.getSimpleName()
+                          + System.currentTimeMillis());
     tmpConfDir = new File(tmpSolrHome, confDir);
     FileUtils.copyDirectory(new File(TEST_HOME()), tmpSolrHome.getAbsoluteFile());
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java Fri Mar 28 00:55:45 2014
@@ -22,8 +22,6 @@ import java.io.IOException;
 
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.CoreContainer;
@@ -42,7 +40,7 @@ public class ChangedSchemaMergeTest exte
     initCore();
   }
 
-  private File solrHomeDirectory;
+  private final File solrHomeDirectory = createTempDir();
   private File schemaFile = null;
 
   private void addDoc(SolrCore core, String... fieldValues) throws IOException {
@@ -53,7 +51,6 @@ public class ChangedSchemaMergeTest exte
   }
 
   private CoreContainer init() throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
     File changed = new File(solrHomeDirectory, "changed");
     copyMinConf(changed, "name=changed");
     // Overlay with my local schema

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ModifyConfFileTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ModifyConfFileTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ModifyConfFileTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ModifyConfFileTest.java Fri Mar 28 00:55:45 2014
@@ -45,7 +45,7 @@ import org.junit.rules.TestRule;
 import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
 
 public class ModifyConfFileTest extends SolrTestCaseJ4 {
-  private File solrHomeDirectory;
+  private File solrHomeDirectory = createTempDir();
 
   @Rule
   public TestRule solrTestRules = RuleChain.outerRule(new SystemPropertiesRestoreRule());

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java Fri Mar 28 00:55:45 2014
@@ -22,7 +22,6 @@ import java.util.List;
 
 import org.apache.commons.io.FileUtils;
 
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -36,7 +35,8 @@ public class TestBinaryField extends Sol
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    File homeDir = TestUtil.createTempDir("solrtest-TestBinaryField");
+    File homeDir = createTempDir();
+
     File collDir = new File(homeDir, "collection1");
     File dataDir = new File(collDir, "data");
     File confDir = new File(collDir, "conf");

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java Fri Mar 28 00:55:45 2014
@@ -48,8 +48,7 @@ public class TestManagedSchema extends A
   
   @Before
   private void initManagedSchemaCore() throws Exception {
-    createTempDir();
-    final String tmpSolrHomePath = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    final String tmpSolrHomePath = createTempDir().getAbsolutePath();
     tmpSolrHome = new File(tmpSolrHomePath).getAbsoluteFile();
     tmpConfDir = new File(tmpSolrHome, confDir);
     File testHomeConfDir = new File(TEST_HOME(), confDir);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestAddFieldRealTimeGet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestAddFieldRealTimeGet.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestAddFieldRealTimeGet.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestAddFieldRealTimeGet.java Fri Mar 28 00:55:45 2014
@@ -21,8 +21,6 @@ import java.io.File;
 import java.util.Collections;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.SchemaField;
 import org.junit.Before;
@@ -37,8 +35,7 @@ public class TestAddFieldRealTimeGet ext
 
   @Before
   private void initManagedSchemaCore() throws Exception {
-    createTempDir();
-    final String tmpSolrHomePath = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    final String tmpSolrHomePath = createTempDir().getAbsolutePath();
     tmpSolrHome = new File(tmpSolrHomePath).getAbsoluteFile();
     tmpConfDir = new File(tmpSolrHome, confDir);
     File testHomeConfDir = new File(TEST_HOME(), confDir);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java Fri Mar 28 00:55:45 2014
@@ -40,8 +40,6 @@ import org.apache.hadoop.fs.FSDataOutput
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.cloud.hdfs.HdfsBasicDistributedZk2Test;
 import org.apache.solr.cloud.hdfs.HdfsTestUtil;
@@ -78,7 +76,9 @@ public class TestRecoveryHdfs extends So
   
   @BeforeClass
   public static void beforeClass() throws Exception {
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(new File(createTempDir(),
+        HdfsBasicDistributedZk2Test.class.getName() + "_"
+            + System.currentTimeMillis()).getAbsolutePath());
     hdfsUri = dfsCluster.getFileSystem().getUri().toString();
     
     try {

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java Fri Mar 28 00:55:45 2014
@@ -16,23 +16,17 @@
  */
 package org.apache.solr.search;
 
+import java.io.File;
+import java.util.Collections;
+
+import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.schema.SchemaField;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.ManagedIndexSchema;
-
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
-
-import org.apache.commons.io.FileUtils;
-
-import java.io.File;
-import java.util.Collections;
-
-import org.junit.BeforeClass;
+import org.apache.solr.schema.SchemaField;
 import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 /**
  * Requests to open a new searcher w/o any underlying change to the index exposed 
@@ -55,8 +49,7 @@ public class TestSearcherReuse extends S
    */
   @BeforeClass
   private static void setupTempDirAndCoreWithManagedSchema() throws Exception {
-    createTempDir();
-    solrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    solrHome = createTempDir();
     solrHome = solrHome.getAbsoluteFile();
 
     File confDir = new File(solrHome, confPath);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java Fri Mar 28 00:55:45 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.solr.servlet;
 
+
+
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
@@ -43,7 +45,7 @@ public class CacheHeaderTest extends Cac
     
   @BeforeClass
   public static void beforeTest() throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir("CacheHeaderTest");
+    solrHomeDirectory = new File(createTempDir(), "CacheHeaderTest");
     setupJettyTestHome(solrHomeDirectory, "collection1");
     createJetty(solrHomeDirectory.getAbsolutePath(), null, null);
   }
@@ -254,7 +256,7 @@ public class CacheHeaderTest extends Cac
 
   protected File makeFile(String contents, String charset) {
     try {
-      File f = TestUtil.createTempFile("cachetest_csv", null);
+      File f = TestUtil.createTempFile("cachetest_csv", null, initCoreDataDir);
       Writer out = new OutputStreamWriter(new FileOutputStream(f), charset);
       out.write(contents);
       out.close();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java Fri Mar 28 00:55:45 2014
@@ -23,15 +23,12 @@ import java.util.Map;
 import org.apache.lucene.analysis.Token;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.SolrTestCaseJ4.SuppressTempDirCleanUp;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.SpellingParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.component.SpellCheckComponent;
-import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.util.RefCounted;
-import org.apache.solr.util.TestHarness;
 import org.junit.BeforeClass;
 import org.junit.Test;
 

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java Fri Mar 28 00:55:45 2014
@@ -25,6 +25,7 @@ import org.apache.lucene.analysis.Token;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.SolrTestCaseJ4.SuppressTempDirCleanUp;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.search.SolrIndexSearcher;
@@ -37,6 +38,7 @@ import org.junit.Test;
  *
  * @since solr 1.3
  **/
+@SuppressTempDirCleanUp(bugUrl = "https://issues.apache.org/jira/browse/SOLR-1877 Spellcheck IndexReader leak bug?")
 public class FileBasedSpellCheckerTest extends SolrTestCaseJ4 {
 
   private static SpellingQueryConverter queryConverter;
@@ -104,7 +106,8 @@ public class FileBasedSpellCheckerTest e
     spellchecker.add(AbstractLuceneSpellChecker.LOCATION, "spellings.txt");
     spellchecker.add(AbstractLuceneSpellChecker.FIELD, "teststop");
     spellchecker.add(FileBasedSpellChecker.SOURCE_FILE_CHAR_ENCODING, "UTF-8");
-    File indexDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File indexDir = new File(createTempDir(), "spellingIdx");
+    indexDir.mkdirs();
     spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, indexDir.getAbsolutePath());
     spellchecker.add(SolrSpellChecker.FIELD_TYPE, "teststop");
     spellchecker.add(AbstractLuceneSpellChecker.SPELLCHECKER_ARG_NAME, spellchecker);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java Fri Mar 28 00:55:45 2014
@@ -37,9 +37,8 @@ import org.apache.lucene.search.spell.Su
 import org.apache.lucene.search.spell.SuggestWord;
 import org.apache.lucene.search.spell.SuggestWordFrequencyComparator;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.SolrTestCaseJ4.SuppressTempDirCleanUp;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.component.SpellCheckComponent;
@@ -52,6 +51,7 @@ import org.junit.Test;
 /**
  * @since solr 1.3
  */
+@SuppressTempDirCleanUp(bugUrl = "https://issues.apache.org/jira/browse/SOLR-1877 Spellcheck IndexReader leak bug?")
 public class IndexBasedSpellCheckerTest extends SolrTestCaseJ4 {
   protected static SpellingQueryConverter queryConverter;
 
@@ -110,7 +110,8 @@ public class IndexBasedSpellCheckerTest 
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", IndexBasedSpellChecker.class.getName());
 
-    File indexDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File indexDir = createTempDir();
+
     spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, indexDir.getAbsolutePath());
     spellchecker.add(AbstractLuceneSpellChecker.FIELD, "title");
     spellchecker.add(AbstractLuceneSpellChecker.SPELLCHECKER_ARG_NAME, spellchecker);
@@ -185,7 +186,8 @@ public class IndexBasedSpellCheckerTest 
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", IndexBasedSpellChecker.class.getName());
 
-    File indexDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File indexDir = new File(createTempDir(), "spellingIdx");
+    indexDir.mkdirs();
     spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, indexDir.getAbsolutePath());
     spellchecker.add(AbstractLuceneSpellChecker.FIELD, "title");
     spellchecker.add(AbstractLuceneSpellChecker.SPELLCHECKER_ARG_NAME, spellchecker);
@@ -241,7 +243,8 @@ public class IndexBasedSpellCheckerTest 
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", IndexBasedSpellChecker.class.getName());
 
-    File indexDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File indexDir = createTempDir();
+    indexDir.mkdirs();
     spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, indexDir.getAbsolutePath());
     spellchecker.add(AbstractLuceneSpellChecker.FIELD, "title");
     spellchecker.add(AbstractLuceneSpellChecker.SPELLCHECKER_ARG_NAME, spellchecker);
@@ -279,11 +282,11 @@ public class IndexBasedSpellCheckerTest 
     IndexBasedSpellChecker checker = new IndexBasedSpellChecker();
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", IndexBasedSpellChecker.class.getName());
-
-    File base = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-    File indexDir = new File(base, "spellingIdx");
+    
+    File tmpDir = createTempDir();
+    File indexDir = new File(tmpDir, "spellingIdx");
     //create a standalone index
-    File altIndexDir = new File(base, "alternateIdx");
+    File altIndexDir = new File(tmpDir, "alternateIdx" + new Date().getTime());
     Directory dir = newFSDirectory(altIndexDir);
     IndexWriter iw = new IndexWriter(
         dir,

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/suggest/SuggesterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/suggest/SuggesterTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/suggest/SuggesterTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/suggest/SuggesterTest.java Fri Mar 28 00:55:45 2014
@@ -82,10 +82,10 @@ public class SuggesterTest extends SolrT
     System.setProperty("solr.test.leavedatadir", "true");
     addDocs();
     assertU(commit());
-    File data = dataDir;
+    File data = initCoreDataDir;
     String config = configString;
     deleteCore();
-    dataDir = data;
+    initCoreDataDir = data;
     configString = config;
     initCore();
     assertQ(req("qt", requestUri, "q", "ac", SpellingParams.SPELLCHECK_COUNT, "2", SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR, "true"),

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java Fri Mar 28 00:55:45 2014
@@ -30,14 +30,16 @@ import org.apache.lucene.store.IndexInpu
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.store.MergeInfo;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
+
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.store.hdfs.HdfsDirectory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
 import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
 
-public class BlockDirectoryTest extends LuceneTestCase {
+public class BlockDirectoryTest extends SolrTestCaseJ4 {
 
   private class MapperCache implements Cache {
     public Map<String, byte[]> map = new ConcurrentLinkedHashMap.Builder<String, byte[]>().maximumWeightedCapacity(8).build();
@@ -103,7 +105,7 @@ public class BlockDirectoryTest extends 
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    file = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    file = createTempDir();
     FSDirectory dir = FSDirectory.open(new File(file, "base"));
     mapperCache = new MapperCache();
     directory = new BlockDirectory("test", dir, mapperCache, null, true, true);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java Fri Mar 28 00:55:45 2014
@@ -17,7 +17,6 @@ package org.apache.solr.store.hdfs;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Random;
@@ -31,8 +30,6 @@ import org.apache.lucene.store.IOContext
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.store.RAMDirectory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.cloud.hdfs.HdfsTestUtil;
 import org.junit.After;
@@ -60,8 +57,7 @@ public class HdfsDirectoryTest extends S
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    createTempDir();
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
   
   @AfterClass
@@ -77,7 +73,7 @@ public class HdfsDirectoryTest extends S
     Configuration conf = new Configuration();
     conf.set("dfs.permissions.enabled", "false");
     
-    directory = new HdfsDirectory(new Path(dfsCluster.getURI().toString() + dataDir.getAbsolutePath() + "/hdfs"), conf);
+    directory = new HdfsDirectory(new Path(dfsCluster.getURI().toString() + createTempDir().getAbsolutePath() + "/hdfs"), conf);
     
     random = random();
   }

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java Fri Mar 28 00:55:45 2014
@@ -17,6 +17,7 @@ package org.apache.solr.store.hdfs;
  * limitations under the License.
  */
 
+import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 
@@ -24,7 +25,6 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.lucene.store.Lock;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.cloud.hdfs.HdfsTestUtil;
 import org.junit.After;
@@ -43,8 +43,7 @@ public class HdfsLockFactoryTest extends
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    createTempDir();
-    dfsCluster = HdfsTestUtil.setupClass();
+    dfsCluster = HdfsTestUtil.setupClass(createTempDir().getAbsolutePath());
   }
 
   @AfterClass



Mime
View raw message