use FSDirectory to avoid OOME

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1594187 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-05-13 10:35:20 +00:00
parent b328f13b30
commit be017318d9
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ public class TestIndexWriterThreadsToSegments extends LuceneTestCase {
// LUCENE-5644: index docs w/ multiple threads but in between flushes we limit how many threads can index concurrently in the next // LUCENE-5644: index docs w/ multiple threads but in between flushes we limit how many threads can index concurrently in the next
// iteration, and then verify that no more segments were flushed than number of threads: // iteration, and then verify that no more segments were flushed than number of threads:
public void testSegmentCountOnFlushRandom() throws Exception { public void testSegmentCountOnFlushRandom() throws Exception {
Directory dir = newDirectory(); Directory dir = newFSDirectory(createTempDir());
IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
int maxThreadStates = TestUtil.nextInt(random(), 1, 12); int maxThreadStates = TestUtil.nextInt(random(), 1, 12);