mirror of https://github.com/apache/lucene.git
tone down BaseTermVectorsFormatTestCase.testLotsOfFields in non-nightly (#505)
This test runs across every IndexOptions, indexing hundreds of fields. It is slow for some implementations (e.g. SimpleText). Use less fields for normal runs.
This commit is contained in:
parent
b9934a3dcf
commit
2c750bbedf
|
@ -605,13 +605,13 @@ public abstract class BaseTermVectorsFormatTestCase extends BaseIndexFileFormatT
|
||||||
|
|
||||||
@Slow
|
@Slow
|
||||||
public void testLotsOfFields() throws IOException {
|
public void testLotsOfFields() throws IOException {
|
||||||
int fieldCount = atLeast(100);
|
int fieldCount = TEST_NIGHTLY ? atLeast(100) : atLeast(10);
|
||||||
final RandomDocumentFactory docFactory = new RandomDocumentFactory(fieldCount, 10);
|
final RandomDocumentFactory docFactory = new RandomDocumentFactory(fieldCount, 10);
|
||||||
for (Options options : validOptions()) {
|
for (Options options : validOptions()) {
|
||||||
final Directory dir = newDirectory();
|
final Directory dir = newDirectory();
|
||||||
final RandomIndexWriter writer = new RandomIndexWriter(random(), dir);
|
final RandomIndexWriter writer = new RandomIndexWriter(random(), dir);
|
||||||
final RandomDocument doc =
|
final RandomDocument doc =
|
||||||
docFactory.newDocument(TestUtil.nextInt(random(), 20, fieldCount), 5, options);
|
docFactory.newDocument(TestUtil.nextInt(random(), 5, fieldCount), 5, options);
|
||||||
writer.addDocument(doc.toDocument());
|
writer.addDocument(doc.toDocument());
|
||||||
final IndexReader reader = writer.getReader();
|
final IndexReader reader = writer.getReader();
|
||||||
assertEquals(doc, reader.getTermVectors(0));
|
assertEquals(doc, reader.getTermVectors(0));
|
||||||
|
|
Loading…
Reference in New Issue