You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2021/12/04 19:22:07 UTC
[lucene] branch main updated: tone down BaseTermVectorsFormatTestCase.testLotsOfFields in non-nightly (#505)
This is an automated email from the ASF dual-hosted git repository.
rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 2c750bb tone down BaseTermVectorsFormatTestCase.testLotsOfFields in non-nightly (#505)
2c750bb is described below
commit 2c750bbedf07866e6808bf4d65709a1c09f6c841
Author: Robert Muir <rm...@apache.org>
AuthorDate: Sat Dec 4 14:21:28 2021 -0500
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.
---
.../java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
index 114ea1f..70e7c84 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
@@ -605,13 +605,13 @@ public abstract class BaseTermVectorsFormatTestCase extends BaseIndexFileFormatT
@Slow
public void testLotsOfFields() throws IOException {
- int fieldCount = atLeast(100);
+ int fieldCount = TEST_NIGHTLY ? atLeast(100) : atLeast(10);
final RandomDocumentFactory docFactory = new RandomDocumentFactory(fieldCount, 10);
for (Options options : validOptions()) {
final Directory dir = newDirectory();
final RandomIndexWriter writer = new RandomIndexWriter(random(), dir);
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());
final IndexReader reader = writer.getReader();
assertEquals(doc, reader.getTermVectors(0));