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:
Robert Muir 2014-11-26 20:27:26 +00:00
parent 78dae96a6d
commit 539cf28c33
2 changed files with 12 additions and 12 deletions
lucene/core/src/test/org/apache/lucene

View File

@ -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);

View File

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