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
This commit is contained in:
Robert Muir 2011-06-24 07:49:14 +00:00
parent 74257a2d13
commit ca68be5360
1 changed files with 2 additions and 1 deletions

View File

@ -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++) {