diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java index 6e18635b660..72102e39304 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java @@ -273,7 +273,7 @@ public class TestIndexWriterThreadsToSegments extends LuceneTestCase { } public void testDocsStuckInRAMForever() throws Exception { - Directory dir = newFSDirectory(createTempDir()); + Directory dir = newDirectory(); IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); iwc.setRAMBufferSizeMB(.2); Codec codec = Codec.forName("Lucene46"); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java b/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java index e4b5060e4a8..d24fd6fc9c0 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java @@ -225,7 +225,7 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase { iwc.setMaxBufferedDocs(100); iwc.setRAMBufferSizeMB(-1); IndexWriter w = new IndexWriter(dir, iwc); - for(int i=0;i<100000;i++) { + for(int i=0;i<15000*RANDOM_MULTIPLIER;i++) { Document doc = new Document(); doc.add(newTextField("id", random().nextLong() + "" + random().nextLong(), Field.Store.YES)); w.addDocument(doc);