speed up TestSimpleExplanationsWithFillerDocs (#516)

This is the slowest test suite, runs for ~ 60s, because between every
document it adds 2048 "filler docs". This just adds up to a ton of
indexing across all the test methods.

Use 2048 for Nightly, and instead a smaller number (4) for local builds.
This commit is contained in:
Robert Muir 2021-12-06 22:12:36 -05:00
parent 9000dfc382
commit 4d48dc87f7
No known key found for this signature in database
GPG Key ID: 817AE1DD322D7ECA
1 changed files with 1 additions and 4 deletions

View File

@ -21,7 +21,6 @@ import org.apache.lucene.document.Field;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.lucene.util.TestUtil;
import org.junit.Assume;
import org.junit.BeforeClass;
@ -32,12 +31,10 @@ import org.junit.BeforeClass;
* they will all use terms from same set of source data as our regular docs (to emphasis the DocFreq
* factor in scoring), in which case the queries will be wrapped so they can be excluded.
*/
@Slow // can this be sped up to be non-slow? filler docs make it quite a bit slower and many test
// methods...
public class TestSimpleExplanationsWithFillerDocs extends TestSimpleExplanations {
/** num of empty docs injected between every doc in the index */
private static final int NUM_FILLER_DOCS = BooleanScorer.SIZE;
private static final int NUM_FILLER_DOCS = TEST_NIGHTLY ? BooleanScorer.SIZE : 4;
/** num of empty docs injected prior to the first doc in the (main) index */
private static int PRE_FILLER_DOCS;
/**