Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

fix TestAtomicUpdate to use random dir in filesystem to avoid conflict if two are running at once

Michael McCandlesse1362d4f03b4
diff --git a/src/test/org/apache/lucene/index/TestAtomicUpdate.java b/src/test/org/apache/lucene/index/TestAtomicUpdate.java
index f23289a66d6..ba060875038 100644
--- a/src/test/org/apache/lucene/index/TestAtomicUpdate.java
+++ b/src/test/org/apache/lucene/index/TestAtomicUpdate.java
@@ -188,8 +188,7 @@ public class TestAtomicUpdate extends LuceneTestCase {
directory.close();
// Second in an FSDirectory:
- String tempDir = System.getProperty("java.io.tmpdir");
- File dirPath = new File(tempDir, "lucene.test.atomic");
+ File dirPath = _TestUtil.getTempDir("lucene.test.atomic");
directory = FSDirectory.open(dirPath);
runTest(directory);
directory.close();