From ca68be536015de7c479c7c96e6543f515be98519 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 24 Jun 2011 07:49:14 +0000 Subject: [PATCH] fix test to not open so many files git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1139188 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/org/apache/lucene/index/TestIndexReaderReopen.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java b/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java index d9eada4a4e2..a421550de05 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java @@ -687,7 +687,8 @@ public class TestIndexReaderReopen extends LuceneTestCase { public void testThreadSafety() throws Exception { final Directory dir = newDirectory(); - final int n = atLeast(30); + // NOTE: this also controls the number of threads! + final int n = _TestUtil.nextInt(random, 20, 40); IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))); for (int i = 0; i < n; i++) {