mirror of https://github.com/apache/lucene.git
speed up these two tests
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1641925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78dae96a6d
commit
539cf28c33
lucene/core/src/test/org/apache/lucene
|
@ -296,7 +296,7 @@ public class TestGraphTokenizers extends BaseTokenStreamTestCase {
|
|||
}
|
||||
|
||||
public void testMockGraphTokenFilterRandom() throws Exception {
|
||||
for(int iter=0;iter<10*RANDOM_MULTIPLIER;iter++) {
|
||||
for(int iter=0;iter<3*RANDOM_MULTIPLIER;iter++) {
|
||||
|
||||
if (VERBOSE) {
|
||||
System.out.println("\nTEST: iter=" + iter);
|
||||
|
@ -320,7 +320,7 @@ public class TestGraphTokenizers extends BaseTokenStreamTestCase {
|
|||
|
||||
// Two MockGraphTokenFilters
|
||||
public void testDoubleMockGraphTokenFilterRandom() throws Exception {
|
||||
for(int iter=0;iter<10*RANDOM_MULTIPLIER;iter++) {
|
||||
for(int iter=0;iter<3*RANDOM_MULTIPLIER;iter++) {
|
||||
|
||||
if (VERBOSE) {
|
||||
System.out.println("\nTEST: iter=" + iter);
|
||||
|
@ -344,7 +344,7 @@ public class TestGraphTokenizers extends BaseTokenStreamTestCase {
|
|||
}
|
||||
|
||||
public void testMockGraphTokenFilterBeforeHolesRandom() throws Exception {
|
||||
for(int iter=0;iter<10*RANDOM_MULTIPLIER;iter++) {
|
||||
for(int iter=0;iter<3*RANDOM_MULTIPLIER;iter++) {
|
||||
|
||||
if (VERBOSE) {
|
||||
System.out.println("\nTEST: iter=" + iter);
|
||||
|
@ -368,7 +368,7 @@ public class TestGraphTokenizers extends BaseTokenStreamTestCase {
|
|||
}
|
||||
|
||||
public void testMockGraphTokenFilterAfterHolesRandom() throws Exception {
|
||||
for(int iter=0;iter<10*RANDOM_MULTIPLIER;iter++) {
|
||||
for(int iter=0;iter<3*RANDOM_MULTIPLIER;iter++) {
|
||||
|
||||
if (VERBOSE) {
|
||||
System.out.println("\nTEST: iter=" + iter);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
field.setLongValue(random().nextLong());
|
||||
iw.addDocument(doc);
|
||||
|
@ -79,7 +79,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
BytesRef ref = new BytesRef(TestUtil.randomUnicodeString(random()));
|
||||
field.setBytesValue(ref);
|
||||
|
@ -116,7 +116,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
BytesRef ref = new BytesRef(TestUtil.randomUnicodeString(random()));
|
||||
field.setBytesValue(ref);
|
||||
|
@ -161,7 +161,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
BytesRef ref = new BytesRef(TestUtil.randomSimpleString(random(), 2));
|
||||
field.setBytesValue(ref);
|
||||
|
@ -199,7 +199,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
Document doc = new Document();
|
||||
int numValues = random().nextInt(5);
|
||||
|
@ -261,7 +261,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
Document doc = new Document();
|
||||
int numValues = random().nextInt(5);
|
||||
|
@ -322,7 +322,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
Document doc = new Document();
|
||||
int numValues = random().nextInt(5);
|
||||
|
@ -373,7 +373,7 @@ public class TestMultiDocValues extends LuceneTestCase {
|
|||
iwc.setMergePolicy(newLogMergePolicy());
|
||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
|
||||
|
||||
int numDocs = atLeast(500);
|
||||
int numDocs = TEST_NIGHTLY ? atLeast(500) : atLeast(50);
|
||||
for (int i = 0; i < numDocs; i++) {
|
||||
Document doc = new Document();
|
||||
if (random().nextInt(4) >= 0) {
|
||||
|
|
Loading…
Reference in New Issue