mirror of https://github.com/apache/lucene.git
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:
parent
74257a2d13
commit
ca68be5360
|
@ -687,7 +687,8 @@ public class TestIndexReaderReopen extends LuceneTestCase {
|
||||||
|
|
||||||
public void testThreadSafety() throws Exception {
|
public void testThreadSafety() throws Exception {
|
||||||
final Directory dir = newDirectory();
|
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(
|
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(
|
||||||
TEST_VERSION_CURRENT, new MockAnalyzer(random)));
|
TEST_VERSION_CURRENT, new MockAnalyzer(random)));
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
|
|
Loading…
Reference in New Issue