lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1582571 [1/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
Author: markrmiller
Date: Fri Mar 28 00:55:45 2014
New Revision: 1582571

URL: http://svn.apache.org/r1582571
Log:
SOLR-5914: Merge branch up to trunk, make all tests pass, make some other improvements and small changes.

Modified:
    lucene/dev/branches/solr5914/   (props changed)
    lucene/dev/branches/solr5914/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java
    lucene/dev/branches/solr5914/solr/   (props changed)
    lucene/dev/branches/solr5914/solr/contrib/   (props changed)
    lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
    lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNonWritablePersistFile.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
    lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java
    lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
    lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
    lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
    lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineGoLiveMiniMRTest.java
    lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
    lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
    lucene/dev/branches/solr5914/solr/core/   (props changed)
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SolrXmlInZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestZkChroot.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsCollectionsAPIDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestConfigSets.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNRTOpen.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestNonNRTOpen.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXMLSerializer.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminCreateDiscoverTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminRequestStatusTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/admin/CoreMergeIndexesAdminHandlerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedStopFilterFactory.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/ModifyConfFileTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestAddFieldRealTimeGet.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/spelling/suggest/SuggesterTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/update/SolrIndexSplitterTest.java
    lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactoryTest.java
    lucene/dev/branches/solr5914/solr/solrj/   (props changed)
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/MergeIndexesExampleTestBase.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/AbstractEmbeddedSolrServerTestCase.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java
    lucene/dev/branches/solr5914/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
    lucene/dev/branches/solr5914/solr/test-framework/   (props changed)
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java
    lucene/dev/branches/solr5914/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java

Modified: lucene/dev/branches/solr5914/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java (original)
+++ lucene/dev/branches/solr5914/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java Fri Mar 28 00:55:45 2014
@@ -787,6 +787,24 @@ public final class TestUtil {
    * an exception (typically on Windows).
    */
   public static File createTempDir(String name) {
+    return createTempDir(name, new File(System.getProperty("tempDir", System.getProperty("java.io.tmpdir"))));
+  }
+  
+  /**
+   * Returns a new, empty temporary folder, based on the given name. The folder will be
+   * deleted at the end of the suite. Failure to delete the temporary folder will cause
+   * an exception (typically on Windows).
+   */
+  public static File createTempDir(String name, File tmpDir) {
+    return createTempDir(name, tmpDir, true);
+  }
+  
+  /**
+   * Returns a new, empty temporary folder, based on the given name. The folder will be
+   * deleted at the end of the suite. Failure to delete the temporary folder will cause
+   * an exception (typically on Windows).
+   */
+  public static File createTempDir(String name, File tmpDir, boolean ensureCleanedUp) {
     if (name.length() < 3) {
       throw new IllegalArgumentException("description must be at least 3 characters");
     }
@@ -797,18 +815,18 @@ public final class TestUtil {
     // does not affect the randomness of the test.
     final Random random = new Random(RandomizedContext.current().getRandom().nextLong());
     int attempt = 0;
-    String tmpDir = System.getProperty("tempDir", System.getProperty("java.io.tmpdir"));
     File f;
     do {
-      f = genTempFile(random, name + "_", "", new File(tmpDir));
+      f = genTempFile(random, name + "_", "", tmpDir);
     } while (!f.mkdir() && (attempt++) < GET_TEMP_DIR_RETRY_THRESHOLD);
     
     if (attempt > GET_TEMP_DIR_RETRY_THRESHOLD) {
       throw new RuntimeException(
           "failed to get a temporary dir too many times. check your temp directory and consider manually cleaning it.");
     }
-  
-    LuceneTestCase.closeAfterSuite(new CloseableFile(f, LuceneTestCase.suiteFailureMarker));
+    if (ensureCleanedUp) {
+      LuceneTestCase.closeAfterSuite(new CloseableFile(f, LuceneTestCase.suiteFailureMarker));
+    }
     return f;
   }
 

Modified: lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java Fri Mar 28 00:55:45 2014
@@ -63,13 +63,9 @@ public class TestICUCollationField exten
    * So its preferable to create this file on-the-fly.
    */
   public static String setupSolrHome() throws Exception {
-    // make a solr home underneath the test's TEMP_DIR
-    File tmpFile = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-    tmpFile.delete();
-    tmpFile.mkdir();
-    
+    String tmpFile = createTempDir().getAbsolutePath();
     // make data and conf dirs
-    new File(tmpFile + "/collection1", "data").mkdirs();
+    new File(tmpFile  + "/collection1", "data").mkdirs();
     File confDir = new File(tmpFile + "/collection1", "conf");
     confDir.mkdirs();
     
@@ -91,7 +87,7 @@ public class TestICUCollationField exten
     IOUtils.write(tailoredRules, os, "UTF-8");
     os.close();
 
-    return tmpFile.getAbsolutePath();
+    return tmpFile;
   }
 
   /** 

Modified: lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java Fri Mar 28 00:55:45 2014
@@ -65,10 +65,7 @@ public class TestICUCollationFieldDocVal
    * So its preferable to create this file on-the-fly.
    */
   public static String setupSolrHome() throws Exception {
-    // make a solr home underneath the test's TEMP_DIR
-    File tmpFile = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-    tmpFile.delete();
-    tmpFile.mkdir();
+    File tmpFile = createTempDir();
     
     // make data and conf dirs
     new File(tmpFile + "/collection1", "data").mkdirs();

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java Fri Mar 28 00:55:45 2014
@@ -56,10 +56,11 @@ public abstract class AbstractSqlEntityP
   
   @Before
   public void beforeSqlEntitiyProcessorTestCase() throws Exception {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = createTempDir();
     fileLocation = tmpdir.getPath();
     fileName = "the.properties";
   } 
+  
   @After
   public void afterSqlEntitiyProcessorTestCase() {
     useSimpleCaches = false;

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java Fri Mar 28 00:55:45 2014
@@ -151,7 +151,8 @@ public class TestContentStreamDataSource
 
 
     public void setUp() throws Exception {
-      File home = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+      File home = new File(dataDir,
+              getClass().getName() + "-" + System.currentTimeMillis());
 
       homeDir = new File(home, "inst");
       dataDir = new File(homeDir + "/collection1", "data");

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java Fri Mar 28 00:55:45 2014
@@ -16,18 +16,15 @@
  */
 package org.apache.solr.handler.dataimport;
 
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
-import org.apache.solr.request.LocalSolrQueryRequest;
-
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.io.File;
+
+import org.apache.solr.request.LocalSolrQueryRequest;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
 
 /**
  * <p>
@@ -242,7 +239,7 @@ public class TestDocBuilder2 extends Abs
   @Test
   @Ignore("Fix Me. See SOLR-4103.")
   public void testFileListEntityProcessor_lastIndexTime() throws Exception  {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = File.createTempFile("test", "tmp", createTempDir());
 
     Map<String, String> params = createMap("baseDir", tmpdir.getAbsolutePath());
 

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java Fri Mar 28 00:55:45 2014
@@ -39,7 +39,8 @@ public class TestFileListEntityProcessor
   @Test
   @SuppressWarnings("unchecked")
   public void testSimple() throws IOException {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = createTempDir();
+
     createFile(tmpdir, "a.xml", "a.xml".getBytes("UTF-8"), false);
     createFile(tmpdir, "b.xml", "b.xml".getBytes("UTF-8"), false);
     createFile(tmpdir, "c.props", "c.props".getBytes("UTF-8"), false);
@@ -62,7 +63,10 @@ public class TestFileListEntityProcessor
   
   @Test
   public void testBiggerSmallerFiles() throws IOException {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = File.createTempFile("test", "tmp", createTempDir());
+    tmpdir.delete();
+    tmpdir.mkdir();
+
     long minLength = Long.MAX_VALUE;
     String smallestFile = "";
     byte[] content = "abcdefgij".getBytes("UTF-8");
@@ -129,7 +133,8 @@ public class TestFileListEntityProcessor
 
   @Test
   public void testNTOT() throws IOException {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = createTempDir();
+
     createFile(tmpdir, "a.xml", "a.xml".getBytes("UTF-8"), true);
     createFile(tmpdir, "b.xml", "b.xml".getBytes("UTF-8"), true);
     createFile(tmpdir, "c.props", "c.props".getBytes("UTF-8"), true);
@@ -162,8 +167,9 @@ public class TestFileListEntityProcessor
 
   @Test
   public void testRECURSION() throws IOException {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = createTempDir();
     File childdir = new File(tmpdir + "/child" );
+    childdir.mkdir();
     createFile(childdir, "a.xml", "a.xml".getBytes("UTF-8"), true);
     createFile(childdir, "b.xml", "b.xml".getBytes("UTF-8"), true);
     createFile(childdir, "c.props", "c.props".getBytes("UTF-8"), true);

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNonWritablePersistFile.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNonWritablePersistFile.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNonWritablePersistFile.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNonWritablePersistFile.java Fri Mar 28 00:55:45 2014
@@ -16,17 +16,15 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 public class TestNonWritablePersistFile extends AbstractDataImportHandlerTestCase {
   private static final String FULLIMPORT_QUERY = "select * from x";
 
@@ -54,8 +52,7 @@ public class TestNonWritablePersistFile 
 
   @BeforeClass
   public static void createTempSolrHomeAndCore() throws Exception {
-    createTempDir();
-    tmpSolrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    tmpSolrHome = createTempDir().getAbsolutePath();
     FileUtils.copyDirectory(getFile("dih/solr"), new File(tmpSolrHome).getAbsoluteFile());
     initCore("dataimport-solrconfig.xml", "dataimport-schema.xml", 
              new File(tmpSolrHome).getAbsolutePath());

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java Fri Mar 28 00:55:45 2014
@@ -6,16 +6,11 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
-import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
-import java.util.TimeZone;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -48,7 +43,9 @@ public class TestSimplePropertiesWriter 
   
   @Before
   public void spwBefore() throws Exception {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = File.createTempFile("test", "tmp", createTempDir());
+    tmpdir.delete();
+    tmpdir.mkdir();
     fileLocation = tmpdir.getPath();
     fileName = "the.properties";
   }

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java Fri Mar 28 00:55:45 2014
@@ -26,8 +26,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
@@ -306,7 +304,7 @@ public class TestSolrEntityProcessorEndT
     }
     
     public String getDataDir() {
-      return dataDir.toString();
+      return initCoreDataDir.toString();
     }
     
     public String getSolrConfigFile() {
@@ -318,14 +316,13 @@ public class TestSolrEntityProcessorEndT
     }
 
     public void setUp() throws Exception {
-      File home = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-      
-      homeDir = new File(home + "inst");
-      dataDir = new File(homeDir + "/collection1", "data");
+      String home = createTempDir().getAbsolutePath();
+      homeDir = new File(home  + "inst");
+      initCoreDataDir = new File(homeDir + "/collection1", "data");
       confDir = new File(homeDir + "/collection1", "conf");
       
       homeDir.mkdirs();
-      dataDir.mkdirs();
+      initCoreDataDir.mkdirs();
       confDir.mkdirs();
 
       FileUtils.copyFile(getFile(getSolrXmlFile()), new File(homeDir, "solr.xml"));

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java Fri Mar 28 00:55:45 2014
@@ -16,10 +16,6 @@
  */
 package org.apache.solr.handler.dataimport;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
-import org.junit.Test;
-
 import java.io.File;
 import java.io.Reader;
 import java.io.StringReader;
@@ -29,6 +25,8 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.Test;
+
 /**
  * <p>
  * Test for XPathEntityProcessor
@@ -44,7 +42,8 @@ public class TestXPathEntityProcessor ex
   
   @Test
   public void withFieldsAndXpath() throws Exception {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    File tmpdir = createTempDir();
+    
     createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"), false);
     Map entityAttrs = createMap("name", "e", "url", "cd.xml",
             XPathEntityProcessor.FOR_EACH, "/catalog/cd");
@@ -332,8 +331,12 @@ public class TestXPathEntityProcessor ex
   
   @Test
   public void withDefaultSolrAndXsl() throws Exception {
-    File tmpdir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
-    AbstractDataImportHandlerTestCase.createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"), false);
+    File tmpdir = File.createTempFile("test", "tmp", createTempDir());
+    tmpdir.delete();
+    tmpdir.mkdir();
+    AbstractDataImportHandlerTestCase.createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"),
+            false);
+
     Map entityAttrs = createMap("name", "e",
             XPathEntityProcessor.USE_SOLR_ADD_SCHEMA, "true", "xsl", ""
             + new File(tmpdir, "x.xsl").toURI(), "url", "cd.xml");

Modified: lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java Fri Mar 28 00:55:45 2014
@@ -50,8 +50,7 @@ public class TestZKPropertiesWriter exte
 
   @BeforeClass
   public static void dihZk_beforeClass() throws Exception {
-    createTempDir();
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();

Modified: lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MRUnitBase.java Fri Mar 28 00:55:45 2014
@@ -21,8 +21,6 @@ import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.hadoop.morphline.MorphlineMapRunner;
 import org.apache.solr.morphlines.solr.AbstractSolrMorphlineTestBase;
@@ -47,7 +45,9 @@ public abstract class MRUnitBase extends
   }
   
   protected void setupHadoopConfig(Configuration config) throws IOException {
-    String tempDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    
+    String tempDir = createTempDir().getAbsolutePath();
+
     FileUtils.copyFile(new File(RESOURCES_DIR + "/custom-mimetypes.xml"), new File(tempDir + "/custom-mimetypes.xml"));
 
     AbstractSolrMorphlineTestBase.setupMorphline(tempDir, "test-morphlines/solrCellDocumentTypes", true);

Modified: lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MapReduceIndexerToolArgumentParserTest.java Fri Mar 28 00:55:45 2014
@@ -27,8 +27,6 @@ import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.lucene.util.Constants;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.cloud.AbstractZkTestCase;
 import org.apache.solr.hadoop.dedup.NoChangeUpdateConflictResolver;
@@ -57,12 +55,11 @@ public class MapReduceIndexerToolArgumen
     
   private static final Logger LOG = LoggerFactory.getLogger(MapReduceIndexerToolArgumentParserTest.class);
   
-  private static File solrHomeDirectory;
+  private final File solrHomeDirectory = createTempDir();
   
   @BeforeClass
   public static void beforeClass() {
     assumeFalse("Does not work on Windows, because it uses UNIX shell commands or POSIX paths", Constants.WINDOWS);
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
   }
   
   @Before

Modified: lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineBasicMiniMRTest.java Fri Mar 28 00:55:45 2014
@@ -38,8 +38,6 @@ import org.apache.hadoop.util.JarFinder;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.lucene.util.Constants;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.cloud.AbstractZkTestCase;
@@ -81,7 +79,7 @@ public class MorphlineBasicMiniMRTest ex
   
   private static String tempDir;
   
-  private static File solrHomeDirectory;
+  private static final File solrHomeDirectory = createTempDir();
   
   protected MapReduceIndexerTool createTool() {
     return new MapReduceIndexerTool();
@@ -110,7 +108,6 @@ public class MorphlineBasicMiniMRTest ex
 
   @BeforeClass
   public static void setupClass() throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
     
     assumeTrue(
         "Currently this test can only be run without the lucene test security policy in place",
@@ -125,8 +122,8 @@ public class MorphlineBasicMiniMRTest ex
     
     AbstractZkTestCase.SOLRHOME = solrHomeDirectory;
     FileUtils.copyDirectory(MINIMR_CONF_DIR, solrHomeDirectory);
-
-    tempDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    File dataDir = createTempDir();
+    tempDir = dataDir.getAbsolutePath();
     new File(tempDir).mkdirs();
     FileUtils.copyFile(new File(RESOURCES_DIR + "/custom-mimetypes.xml"), new File(tempDir + "/custom-mimetypes.xml"));
     
@@ -144,7 +141,6 @@ public class MorphlineBasicMiniMRTest ex
 //      sb.append(",").append(i.getCanonicalHostName());
 //    }
     
-    createTempDir();
     new File(dataDir, "nm-local-dirs").mkdirs();
     
     System.setProperty("solr.hdfs.blockcache.enabled", "false");

Modified: lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineGoLiveMiniMRTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineGoLiveMiniMRTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineGoLiveMiniMRTest.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/MorphlineGoLiveMiniMRTest.java Fri Mar 28 00:55:45 2014
@@ -43,8 +43,6 @@ import org.apache.hadoop.util.JarFinder;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.lucene.util.Constants;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
@@ -110,7 +108,7 @@ public class MorphlineGoLiveMiniMRTest e
   private final String inputAvroFile2;
   private final String inputAvroFile3;
 
-  private static File solrHomeDirectory;
+  private static final File solrHomeDirectory = createTempDir();
 
   @Override
   public String getSolrHome() {
@@ -140,17 +138,18 @@ public class MorphlineGoLiveMiniMRTest e
     assumeFalse("FIXME: This test fails under Java 8 due to the Saxon dependency - see SOLR-1301", Constants.JRE_IS_MINIMUM_JAVA8);
     assumeFalse("FIXME: This test fails under J9 due to the Saxon dependency - see SOLR-1301", System.getProperty("java.vm.info", "<?>").contains("IBM J9"));
     
-    solrHomeDirectory = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
     AbstractZkTestCase.SOLRHOME = solrHomeDirectory;
     FileUtils.copyDirectory(MINIMR_INSTANCE_DIR, AbstractZkTestCase.SOLRHOME);
+    tempDir = createTempDir().getAbsolutePath();
+
+    new File(tempDir).mkdirs();
 
-    tempDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
     FileUtils.copyFile(new File(RESOURCES_DIR + "/custom-mimetypes.xml"), new File(tempDir + "/custom-mimetypes.xml"));
     
     AbstractSolrMorphlineTestBase.setupMorphline(tempDir, "test-morphlines/solrCellDocumentTypes", true);
     
     
-    System.setProperty("hadoop.log.dir", new File(dataDir, "logs").getAbsolutePath());
+    System.setProperty("hadoop.log.dir", new File(tempDir, "logs").getAbsolutePath());
     
     int taskTrackers = 2;
     int dataNodes = 2;
@@ -162,16 +161,15 @@ public class MorphlineGoLiveMiniMRTest e
     conf.set("dfs.permissions", "true");
     conf.set("hadoop.security.authentication", "simple");
 
-    conf.set(YarnConfiguration.NM_LOCAL_DIRS, dataDir + File.separator +  "nm-local-dirs");
-    conf.set(YarnConfiguration.DEFAULT_NM_LOG_DIRS, dataDir + File.separator +  "nm-logs");
+    conf.set(YarnConfiguration.NM_LOCAL_DIRS, tempDir + File.separator +  "nm-local-dirs");
+    conf.set(YarnConfiguration.DEFAULT_NM_LOG_DIRS, tempDir + File.separator +  "nm-logs");
 
     
-    createTempDir();
-    new File(dataDir + File.separator +  "nm-local-dirs").mkdirs();
+    new File(tempDir + File.separator +  "nm-local-dirs").mkdirs();
     
-    System.setProperty("test.build.dir", dataDir + File.separator + "hdfs" + File.separator + "test-build-dir");
-    System.setProperty("test.build.data", dataDir + File.separator + "hdfs" + File.separator + "build");
-    System.setProperty("test.cache.data", dataDir + File.separator + "hdfs" + File.separator + "cache");
+    System.setProperty("test.build.dir", tempDir + File.separator + "hdfs" + File.separator + "test-build-dir");
+    System.setProperty("test.build.data", tempDir + File.separator + "hdfs" + File.separator + "build");
+    System.setProperty("test.cache.data", tempDir + File.separator + "hdfs" + File.separator + "cache");
     
     dfsCluster = new MiniDFSCluster(conf, dataNodes, true, null);
     FileSystem fileSystem = dfsCluster.getFileSystem();
@@ -185,7 +183,7 @@ public class MorphlineGoLiveMiniMRTest e
     fileSystem.setPermission(new Path("/hadoop/mapred/system"),
         FsPermission.valueOf("-rwx------"));
     
-    mrCluster = MiniMRClientClusterFactory.create(MorphlineGoLiveMiniMRTest.class, 1, conf, new File(dataDir, "mrCluster")); 
+    mrCluster = MiniMRClientClusterFactory.create(MorphlineGoLiveMiniMRTest.class, 1, conf, new File(tempDir, "mrCluster")); 
         
         //new MiniMRCluster(0, 0, taskTrackers, nnURI, numDirs, racks,
         //hosts, null, conf);

Modified: lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineTestBase.java Fri Mar 28 00:55:45 2014
@@ -32,8 +32,6 @@ import java.util.TimeZone;
 import java.util.concurrent.atomic.AtomicInteger;
 
 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.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
@@ -120,7 +118,7 @@ public class AbstractSolrMorphlineTestBa
     testServer = new SolrServerDocumentLoader(solrServer, batchSize);
     deleteAllDocuments();
     
-    tempDir = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    tempDir = createTempDir().getAbsolutePath();
   }
   
   @After

Modified: lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java (original)
+++ lucene/dev/branches/solr5914/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java Fri Mar 28 00:55:45 2014
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.util.Iterator;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
@@ -33,9 +32,8 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
-import org.kitesdk.morphline.api.Command;
 import org.kitesdk.morphline.api.Collector;
+import org.kitesdk.morphline.api.Command;
 import org.kitesdk.morphline.api.MorphlineContext;
 import org.kitesdk.morphline.api.Record;
 import org.kitesdk.morphline.base.Compiler;
@@ -48,8 +46,8 @@ import com.google.common.collect.ListMul
 import com.typesafe.config.Config;
 
 public abstract class AbstractSolrMorphlineZkTestBase extends AbstractFullDistribZkTestBase {
-  private static File solrHomeDirectory;
-
+  private static final File solrHomeDirectory = createTempDir();
+  
   protected static final String RESOURCES_DIR = getFile("morphlines-core.marker").getParent();  
   private static final File SOLR_INSTANCE_DIR = new File(RESOURCES_DIR + "/solr");
   private static final File SOLR_CONF_DIR = new File(RESOURCES_DIR + "/solr/collection1");
@@ -70,10 +68,8 @@ public abstract class AbstractSolrMorphl
   
   @BeforeClass
   public static void setupClass() throws Exception {
-    solrHomeDirectory = TestUtil.createTempDir(AbstractSolrMorphlineZkTestBase.class.getName());
     AbstractZkTestCase.SOLRHOME = solrHomeDirectory;
     FileUtils.copyDirectory(SOLR_INSTANCE_DIR, solrHomeDirectory);
-    createTempDir();
   }
   
   @Override

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java Fri Mar 28 00:55:45 2014
@@ -17,8 +17,10 @@ package org.apache.solr;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
@@ -30,9 +32,6 @@ import org.apache.solr.core.SolrCore;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
-import java.io.File;
-import java.io.IOException;
-
 public class AnalysisAfterCoreReloadTest extends SolrTestCaseJ4 {
   
   private static String tmpSolrHome;
@@ -43,8 +42,7 @@ public class AnalysisAfterCoreReloadTest
   
   @BeforeClass
   public static void beforeClass() throws Exception {
-    createTempDir();
-    tmpSolrHome = TestUtil.createTempDir(AnalysisAfterCoreReloadTest.class.getSimpleName()).getAbsolutePath();
+    tmpSolrHome = createTempDir().getAbsolutePath();
     FileUtils.copyDirectory(new File(TEST_HOME()), new File(tmpSolrHome).getAbsoluteFile());
     initCore("solrconfig.xml", "schema.xml", new File(tmpSolrHome).getAbsolutePath());
   }

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java Fri Mar 28 00:55:45 2014
@@ -17,15 +17,13 @@ package org.apache.solr;
  * limitations under the License.
  */
 
+import java.io.File;
+
 import org.apache.commons.io.FileUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.File;
-
 
 public class SolrTestCaseJ4Test extends SolrTestCaseJ4 {
 
@@ -35,8 +33,7 @@ public class SolrTestCaseJ4Test extends 
   public static void beforeClass() throws Exception {
     // Create a temporary directory that holds a core NOT named "collection1". Use the smallest configuration sets
     // we can so we don't copy that much junk around.
-    createTempDir();
-    tmpSolrHome = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()).getAbsolutePath();
+    tmpSolrHome = createTempDir().getAbsolutePath();
 
     File subHome = new File(new File(tmpSolrHome, "core0"), "conf");
     assertTrue("Failed to make subdirectory ", subHome.mkdirs());

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java Fri Mar 28 00:55:45 2014
@@ -16,25 +16,19 @@
  */
 package org.apache.solr;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+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.lucene.util.LuceneTestCase;
-//import org.apache.solr.util.AbstractSolrTestCase;
-//import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-//import org.apache.solr.client.solrj.impl.HttpSolrServer;
-//import org.apache.solr.client.solrj.SolrServer;
-//import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
-
-import org.apache.commons.io.FileUtils;
-
 import org.junit.BeforeClass;
 
-import java.io.*;
-import java.util.Properties;
-
 
 /**
  * <p> Test for Loading core properties from a properties file </p>
@@ -46,7 +40,8 @@ public class TestSolrCoreProperties exte
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    File homeDir = TestUtil.createTempDir(TestSolrCoreProperties.class.getSimpleName());
+    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/cloud/BasicDistributedZk2Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java Fri Mar 28 00:55:45 2014
@@ -26,8 +26,6 @@ import java.util.regex.Pattern;
 
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.BasicResponseHandler;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
@@ -170,8 +168,7 @@ public class BasicDistributedZk2Test ext
       createCmd.setCoreName(ONE_NODE_COLLECTION + "core");
       createCmd.setCollection(ONE_NODE_COLLECTION);
       createCmd.setNumShards(1);
-      createCmd.setDataDir(getDataDir(dataDir.getAbsolutePath() + File.separator
-          + ONE_NODE_COLLECTION));
+      createCmd.setDataDir(getDataDir(createTempDir(ONE_NODE_COLLECTION).getAbsolutePath()));
       server.request(createCmd);
       server.shutdown();
     } catch (Exception e) {
@@ -417,7 +414,7 @@ public class BasicDistributedZk2Test ext
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("qt", "/replication");
     params.set("command", "backup");
-    File location = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName() + "-backupdir");
+    File location = createTempDir();
     params.set("location", location.getAbsolutePath());
 
     QueryRequest request = new QueryRequest(params);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -17,7 +17,6 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
@@ -38,8 +37,8 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.JSONTestUtil;
+import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServer;
@@ -388,8 +387,7 @@ public class BasicDistributedZkTest exte
     Create createCmd = new Create();
     createCmd.setCoreName("core1");
     createCmd.setCollection("the_core_collection");
-    String coredataDir = dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + "the_core_collection";
+    String coredataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(coredataDir);
     createCmd.setNumShards(1);
     createCmd.setSchemaName("nonexistent_schema.xml");
@@ -569,8 +567,7 @@ public class BasicDistributedZkTest exte
 
           createCmd.setNumShards(numShards);
           try {
-            String core3dataDir = dataDir.getAbsolutePath() + File.separator
-                + System.currentTimeMillis() + collection + "_3n" + freezeI;
+            String core3dataDir = createTempDir(collection).getAbsolutePath();
             createCmd.setDataDir(getDataDir(core3dataDir));
 
             server.request(createCmd);
@@ -982,8 +979,7 @@ public class BasicDistributedZkTest exte
           if (shardId == null) {
             createCmd.setNumShards(2);
           }
-          createCmd.setDataDir(getDataDir(dataDir.getAbsolutePath() + File.separator
-              + collection + num));
+          createCmd.setDataDir(getDataDir(createTempDir(collection).getAbsolutePath()));
           if (shardId != null) {
             createCmd.setShardId(shardId);
           }
@@ -1110,11 +1106,8 @@ public class BasicDistributedZkTest exte
             server.setSoTimeout(60000);
             Create createCmd = new Create();
             createCmd.setCoreName(collection);
-            createCmd.setDataDir(getDataDir(dataDir.getAbsolutePath() + File.separator
-                + collection + frozeUnique));
-
+            createCmd.setDataDir(getDataDir(createTempDir(collection).getAbsolutePath()));
             server.request(createCmd);
-
           } catch (Exception e) {
             e.printStackTrace();
             //fails

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java Fri Mar 28 00:55:45 2014
@@ -68,11 +68,12 @@ public class ClusterStateUpdateTest exte
   
   private File dataDir4;
 
-  private static File solrHomeDirectory;
+
+  private static volatile File solrHomeDirectory;
 
   @BeforeClass
   public static void beforeClass() throws IOException {
-    solrHomeDirectory = TestUtil.createTempDir(ClusterStateUpdateTest.class.getSimpleName());
+    solrHomeDirectory = new File(createTempDir(), "ZkControllerTest");
     System.setProperty("solrcloud.skip.autorecovery", "true");
     System.setProperty("genericCoreNodeNames", "false");
     if (solrHomeDirectory.exists()) {
@@ -95,10 +96,9 @@ public class ClusterStateUpdateTest exte
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    createTempDir();
     System.setProperty("zkClientTimeout", "3000");
-
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    File tmpDir = createTempDir();
+    zkDir = tmpDir.getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();
@@ -107,16 +107,16 @@ public class ClusterStateUpdateTest exte
         .getZkAddress(), "solrconfig.xml", "schema.xml");
     
     log.info("####SETUP_START " + getTestName());
-    dataDir1 = new File(dataDir + File.separator + "data1");
+    dataDir1 = new File(tmpDir + File.separator + "data1");
     dataDir1.mkdirs();
     
-    dataDir2 = new File(dataDir + File.separator + "data2");
+    dataDir2 = new File(tmpDir + File.separator + "data2");
     dataDir2.mkdirs();
     
-    dataDir3 = new File(dataDir + File.separator + "data3");
+    dataDir3 = new File(tmpDir + File.separator + "data3");
     dataDir3.mkdirs();
     
-    dataDir4 = new File(dataDir + File.separator + "data4");
+    dataDir4 = new File(tmpDir + File.separator + "data4");
     dataDir4.mkdirs();
     
     // set some system properties for use by tests

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -50,7 +50,6 @@ import javax.management.ObjectName;
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.TestUtil;
-import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServer;
@@ -335,8 +334,7 @@ public class CollectionsAPIDistributedZk
     Create createCmd = new Create();
     createCmd.setCoreName("halfdeletedcollection_shard1_replica1");
     createCmd.setCollection(collectionName);
-    String dataDir = SolrTestCaseJ4.dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + "halfcollection" + "_hdn";
+    String dataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(dataDir);
     createCmd.setNumShards(2);
     if (secondConfigSet) {
@@ -527,8 +525,7 @@ public class CollectionsAPIDistributedZk
     Create createCmd = new Create();
     createCmd.setCoreName("halfcollection_shard1_replica1");
     createCmd.setCollection("halfcollectionblocker");
-    String dataDir = SolrTestCaseJ4.dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + "halfcollection" + "_3n";
+    String dataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(dataDir);
     createCmd.setNumShards(1);
     if (secondConfigSet) {
@@ -539,8 +536,7 @@ public class CollectionsAPIDistributedZk
     createCmd = new Create();
     createCmd.setCoreName("halfcollection_shard1_replica1");
     createCmd.setCollection("halfcollectionblocker2");
-    dataDir = SolrTestCaseJ4.dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + "halfcollection" + "_3n";
+    dataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(dataDir);
     createCmd.setNumShards(1);
     if (secondConfigSet) {
@@ -589,8 +585,7 @@ public class CollectionsAPIDistributedZk
     Create createCmd = new Create();
     createCmd.setCoreName("corewithnocollection");
     createCmd.setCollection("");
-    String dataDir = SolrTestCaseJ4.dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + "corewithnocollection" + "_1v";
+    String dataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(dataDir);
     createCmd.setNumShards(1);
     if (secondConfigSet) {

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java Fri Mar 28 00:55:45 2014
@@ -36,9 +36,8 @@ public class ConnectionManagerTest exten
   @Ignore
   public void testConnectionManager() throws Exception {
     
-    createTempDir();
     // 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);
@@ -72,9 +71,8 @@ public class ConnectionManagerTest exten
 
   public void testLikelyExpired() throws Exception {
 
-    createTempDir();
     // 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);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java Fri Mar 28 00:55:45 2014
@@ -73,14 +73,14 @@ public class LeaderElectionIntegrationTe
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    createTempDir();
+
     ignoreException("No UpdateLog found - cannot sync");
     ignoreException("No UpdateLog found - cannot recover");
     
     System.setProperty("zkClientTimeout", "8000");
     
-    zkDir = dataDir.getAbsolutePath() + File.separator
-        + "zookeeper" + System.currentTimeMillis() + "/server1/data";
+    zkDir = createTempDir().getAbsolutePath() + File.separator
+        + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();
     System.setProperty("zkHost", zkServer.getZkAddress());
@@ -133,8 +133,7 @@ public class LeaderElectionIntegrationTe
      
   private void setupContainer(int port, String shard) throws IOException,
       ParserConfigurationException, SAXException {
-    File data = new File(dataDir + File.separator + "data_" + port);
-    data.mkdirs();
+    File data = createTempDir();
     
     System.setProperty("hostPort", Integer.toString(port));
     System.setProperty("shard", shard);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java Fri Mar 28 00:55:45 2014
@@ -55,7 +55,7 @@ public class LeaderElectionTest extends 
   
   @BeforeClass
   public static void beforeClass() {
-    createTempDir();
+
   }
   
   @AfterClass
@@ -66,7 +66,7 @@ public class LeaderElectionTest extends 
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     
     server = new ZkTestServer(zkDir);

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java Fri Mar 28 00:55:45 2014
@@ -43,7 +43,6 @@ import org.apache.solr.common.cloud.Slic
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.handler.admin.CollectionsHandler;
 import org.apache.solr.handler.component.HttpShardHandlerFactory;
 import org.apache.solr.util.DefaultSolrThreadFactory;
 import org.apache.zookeeper.CreateMode;
@@ -204,7 +203,7 @@ public class OverseerTest extends SolrTe
 
   @Test
   public void testShardAssignment() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
 
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -260,7 +259,7 @@ public class OverseerTest extends SolrTe
 
   @Test
   public void testBadQueueItem() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
 
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -335,7 +334,7 @@ public class OverseerTest extends SolrTe
   
   @Test
   public void testShardAssignmentBigger() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
 
     final int nodeCount = random().nextInt(50)+50;   //how many simulated nodes (num of threads)
@@ -506,7 +505,7 @@ public class OverseerTest extends SolrTe
   
   @Test
   public void testStateChange() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -603,7 +602,7 @@ public class OverseerTest extends SolrTe
 
   @Test
   public void testOverseerFailure() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = new ZkTestServer(zkDir);
     
@@ -726,7 +725,7 @@ public class OverseerTest extends SolrTe
   
   @Test
   public void testShardLeaderChange() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     final ZkTestServer server = new ZkTestServer(zkDir);
     SolrZkClient controllerClient = null;
@@ -782,7 +781,7 @@ public class OverseerTest extends SolrTe
 
   @Test
   public void testDoubleAssignment() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -847,7 +846,7 @@ public class OverseerTest extends SolrTe
 
   @Test
   public void testPlaceholders() throws Exception {
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     
     ZkTestServer server = new ZkTestServer(zkDir);
@@ -896,7 +895,7 @@ public class OverseerTest extends SolrTe
   
   @Test
   public void testReplay() throws Exception{
-    String zkDir = dataDir.getAbsolutePath() + File.separator
+    String zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     ZkTestServer server = new ZkTestServer(zkDir);
     SolrZkClient zkClient = null;

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java Fri Mar 28 00:55:45 2014
@@ -74,10 +74,10 @@ public class SliceStateUpdateTest extend
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    createTempDir();
+
     System.setProperty("zkClientTimeout", "3000");
 
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();
@@ -99,11 +99,9 @@ public class SliceStateUpdateTest extend
         CreateMode.PERSISTENT, true);
     zkClient.close();
 
-    dataDir1 = new File(dataDir + File.separator + "data1");
-    dataDir1.mkdirs();
+    dataDir1 = new File(createTempDir() + File.separator + "data1");
 
-    dataDir2 = new File(dataDir + File.separator + "data2");
-    dataDir2.mkdirs();
+    dataDir2 = new File(createTempDir() + File.separator + "data2");
 
     // set some system properties for use by tests
     System.setProperty("solr.test.sys.prop1", "propone");

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SolrXmlInZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SolrXmlInZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SolrXmlInZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/SolrXmlInZkTest.java Fri Mar 28 00:55:45 2014
@@ -16,8 +16,10 @@ package org.apache.solr.cloud;
  * the License.
  */
 
-import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
-import com.google.common.base.Charsets;
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
@@ -32,11 +34,8 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TestRule;
 
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.nio.charset.Charset;
+import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
+import com.google.common.base.Charsets;
 
 public class SolrXmlInZkTest extends SolrTestCaseJ4 {
 
@@ -51,8 +50,6 @@ public class SolrXmlInZkTest extends Sol
 
   private ZkStateReader reader;
 
-  private static int PORT = 7000;
-
   private ConfigSolr cfg;
 
   @Before
@@ -61,9 +58,9 @@ public class SolrXmlInZkTest extends Sol
   }
 
   private void setUpZkAndDiskXml(boolean toZk, boolean leaveOnLocal) throws Exception {
-
-    createTempDir();
-    File solrHome = new File(dataDir, "home");
+    File tmpDir = createTempDir();
+    recurseDelete(tmpDir);
+    File solrHome = new File(tmpDir, "home");
     copyMinConf(new File(solrHome, "myCollect"));
     if (leaveOnLocal) {
       FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr-stress-new.xml"), new File(solrHome, "solr.xml"));
@@ -76,7 +73,7 @@ public class SolrXmlInZkTest extends Sol
 
     System.setProperty("zkClientTimeout", "8000");
 
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    zkDir = tmpDir.getAbsolutePath() + File.separator
         + "zookeeper" + System.currentTimeMillis() + "/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java Fri Mar 28 00:55:45 2014
@@ -19,8 +19,6 @@ package org.apache.solr.cloud;
 
 import java.io.File;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.core.CoreContainer;
@@ -36,6 +34,7 @@ public class TestMultiCoreConfBootstrap 
   protected CoreContainer cores = null;
   private String home;
   
+  protected File dataDir1;
   protected File dataDir2;
   protected ZkTestServer zkServer;
   protected String zkDir;
@@ -44,16 +43,15 @@ public class TestMultiCoreConfBootstrap 
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    
-    createTempDir();
-    dataDir2 = TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName());
+    dataDir1 = createTempDir();
+    dataDir2  = createTempDir();
 
     home = ExternalPaths.EXAMPLE_MULTICORE_HOME;
     System.setProperty("solr.solr.home", home);
-    System.setProperty( "solr.core0.data.dir", dataDir.getCanonicalPath() ); 
+    System.setProperty( "solr.core0.data.dir", dataDir1.getCanonicalPath() ); 
     System.setProperty( "solr.core1.data.dir", dataDir2.getCanonicalPath() ); 
     
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    zkDir = dataDir1.getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestZkChroot.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestZkChroot.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestZkChroot.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/TestZkChroot.java Fri Mar 28 00:55:45 2014
@@ -17,11 +17,12 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
+import java.io.File;
+
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.cloud.ZooKeeperException;
 import org.apache.solr.core.CoreContainer;
-import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.After;
 import org.junit.Before;
@@ -29,8 +30,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-
 public class TestZkChroot extends SolrTestCaseJ4 {
   protected static Logger log = LoggerFactory.getLogger(TestZkChroot.class);
   protected CoreContainer cores = null;
@@ -43,8 +42,8 @@ public class TestZkChroot extends SolrTe
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    createTempDir();
-    zkDir = dataDir.getAbsolutePath() + File.separator
+
+    zkDir = createTempDir().getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     zkServer = new ZkTestServer(zkDir);
     zkServer.run();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java Fri Mar 28 00:55:45 2014
@@ -84,13 +84,11 @@ public class UnloadDistributedZkTest ext
 
   private void testUnloadShardAndCollection() throws Exception{
     // create one leader and one replica
-    
     Create createCmd = new Create();
     createCmd.setCoreName("test_unload_shard_and_collection_1");
     String collection = "test_unload_shard_and_collection";
     createCmd.setCollection(collection);
-    String coreDataDir = dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + collection + "1";
+    String coreDataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(getDataDir(coreDataDir));
     createCmd.setNumShards(2);
     
@@ -105,8 +103,7 @@ public class UnloadDistributedZkTest ext
     createCmd.setCoreName("test_unload_shard_and_collection_2");
     collection = "test_unload_shard_and_collection";
     createCmd.setCollection(collection);
-    coreDataDir = dataDir.getAbsolutePath() + File.separator
-        + System.currentTimeMillis() + collection + "2";
+    coreDataDir = createTempDir().getAbsolutePath();
     createCmd.setDataDir(getDataDir(coreDataDir));
     
     server.request(createCmd);
@@ -157,6 +154,8 @@ public class UnloadDistributedZkTest ext
    * @throws Exception on any problem
    */
   private void testCoreUnloadAndLeaders() throws Exception {
+    File tmpDir = createTempDir();
+    
     // create a new collection collection
     SolrServer client = clients.get(0);
     String url1 = getBaseUrl(client);
@@ -168,7 +167,7 @@ public class UnloadDistributedZkTest ext
     createCmd.setCoreName("unloadcollection1");
     createCmd.setCollection("unloadcollection");
     createCmd.setNumShards(1);
-    String core1DataDir = dataDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection1" + "_1n";
+    String core1DataDir = tmpDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection1" + "_1n";
     createCmd.setDataDir(getDataDir(core1DataDir));
     server.request(createCmd);
     server.shutdown();
@@ -188,7 +187,7 @@ public class UnloadDistributedZkTest ext
     createCmd = new Create();
     createCmd.setCoreName("unloadcollection2");
     createCmd.setCollection("unloadcollection");
-    String core2dataDir = dataDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection1" + "_2n";
+    String core2dataDir = tmpDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection1" + "_2n";
     createCmd.setDataDir(getDataDir(core2dataDir));
     server.request(createCmd);
     server.shutdown();
@@ -230,7 +229,7 @@ public class UnloadDistributedZkTest ext
     createCmd = new Create();
     createCmd.setCoreName("unloadcollection3");
     createCmd.setCollection("unloadcollection");
-    String core3dataDir = dataDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection" + "_3n";
+    String core3dataDir = tmpDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection" + "_3n";
     createCmd.setDataDir(getDataDir(core3dataDir));
     server.request(createCmd);
     server.shutdown();
@@ -308,7 +307,7 @@ public class UnloadDistributedZkTest ext
     createCmd = new Create();
     createCmd.setCoreName("unloadcollection4");
     createCmd.setCollection("unloadcollection");
-    String core4dataDir = dataDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection" + "_4n";
+    String core4dataDir = tmpDir.getAbsolutePath() + File.separator + System.currentTimeMillis() + "unloadcollection" + "_4n";
     createCmd.setDataDir(getDataDir(core4dataDir));
     server.request(createCmd);
     server.shutdown();

Modified: lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java?rev=1582571&r1=1582570&r2=1582571&view=diff
==============================================================================
--- lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java (original)
+++ lucene/dev/branches/solr5914/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java Fri Mar 28 00:55:45 2014
@@ -28,8 +28,6 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.filefilter.RegexFileFilter;
 import org.apache.commons.io.filefilter.TrueFileFilter;
-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.cloud.SolrZkClient;
@@ -76,21 +74,20 @@ public class ZkCLITest extends SolrTestC
   public void setUp() throws Exception {
     super.setUp();
     log.info("####SETUP_START " + getTestName());
-    createTempDir();
     
     boolean useNewSolrXml = random().nextBoolean();
-    
+    File tmpDir = createTempDir();
     if (useNewSolrXml) {
       solrHome = ExternalPaths.EXAMPLE_HOME;
     } else {
-      File tmpSolrHome = new File(dataDir, "tmp-solr-home");
+      File tmpSolrHome = new File(tmpDir, "tmp-solr-home");
       FileUtils.copyDirectory(new File(ExternalPaths.EXAMPLE_HOME), tmpSolrHome);
       FileUtils.copyFile(getFile("old-solr-example/solr.xml"), new File(tmpSolrHome, "solr.xml"));
       solrHome = tmpSolrHome.getAbsolutePath();
     }
     
     
-    zkDir = dataDir.getAbsolutePath() + File.separator
+    zkDir = tmpDir.getAbsolutePath() + File.separator
         + "zookeeper/server1/data";
     log.info("ZooKeeper dataDir:" + zkDir);
     zkServer = new ZkTestServer(zkDir);
@@ -206,6 +203,8 @@ public class ZkCLITest extends SolrTestC
   
   @Test
   public void testUpConfigLinkConfigClearZk() throws Exception {
+    File tmpDir = createTempDir();
+    
     // test upconfig
     String confsetname = "confsetone";
     String[] args = new String[] {
@@ -233,7 +232,8 @@ public class ZkCLITest extends SolrTestC
     assertEquals(confsetname, collectionProps.getStr("configName"));
     
     // test down config
-    File confDir = new File(TestUtil.createTempDir(LuceneTestCase.getTestClass().getSimpleName()), "solrtest-confdropspot");
+    File confDir = new File(tmpDir,
+        "solrtest-confdropspot-" + this.getClass().getName() + "-" + System.currentTimeMillis());
     assertFalse(confDir.exists());
 
     args = new String[] {"-zkhost", zkServer.getZkAddress(), "-cmd",
@@ -277,11 +277,14 @@ public class ZkCLITest extends SolrTestC
 
   @Test
   public void testGetFile() throws Exception {
+    File tmpDir = createTempDir();
+    
     String getNode = "/getFileNode";
     byte [] data = new String("getFileNode-data").getBytes("UTF-8");
     this.zkClient.create(getNode, data, CreateMode.PERSISTENT, true);
 
-    File file = TestUtil.createTempFile("solrtest-getfile", "");
+    File file = new File(tmpDir,
+        "solrtest-getfile-" + this.getClass().getName() + "-" + System.currentTimeMillis());
     String[] args = new String[] {"-zkhost", zkServer.getZkAddress(), "-cmd",
         "getfile", getNode, file.getAbsolutePath()};
     ZkCLI.main(args);
@@ -292,9 +295,10 @@ public class ZkCLITest extends SolrTestC
 
   @Test
   public void testGetFileNotExists() throws Exception {
+    File tmpDir = createTempDir();
     String getNode = "/getFileNotExistsNode";
 
-    File file = TestUtil.createTempFile("solrtest-getfilenotexists", "");
+    File file = File.createTempFile("newfile", null, tmpDir);
     String[] args = new String[] {"-zkhost", zkServer.getZkAddress(), "-cmd",
         "getfile", getNode, file.getAbsolutePath()};
     try {



Mime
View raw message