From 91150e24778301f69f907b6a789899d6d8e0b8d6 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sat, 21 Jul 2012 14:36:57 +0000 Subject: [PATCH] also test extremes (1, MAX_VALUE) for DirectPF's configs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1364106 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/index/RandomCodec.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/RandomCodec.java b/lucene/test-framework/src/java/org/apache/lucene/index/RandomCodec.java index 08334ca7da8..d50062dbb00 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/index/RandomCodec.java +++ b/lucene/test-framework/src/java/org/apache/lucene/index/RandomCodec.java @@ -41,6 +41,7 @@ import org.apache.lucene.codecs.mocksep.MockSepPostingsFormat; import org.apache.lucene.codecs.nestedpulsing.NestedPulsingPostingsFormat; import org.apache.lucene.codecs.pulsing.Pulsing40PostingsFormat; import org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; /** @@ -92,7 +93,8 @@ public class RandomCodec extends Lucene40Codec { add(avoidCodecs, new Lucene40PostingsFormat(minItemsPerBlock, maxItemsPerBlock), - new DirectPostingsFormat(minItemsPerBlock, lowFreqCutoff), + new DirectPostingsFormat(LuceneTestCase.rarely(random) ? 1 : (LuceneTestCase.rarely(random) ? Integer.MAX_VALUE : maxItemsPerBlock), + LuceneTestCase.rarely(random) ? 1 : (LuceneTestCase.rarely(random) ? Integer.MAX_VALUE : lowFreqCutoff)), new Pulsing40PostingsFormat(1 + random.nextInt(20), minItemsPerBlock, maxItemsPerBlock), // add pulsing again with (usually) different parameters new Pulsing40PostingsFormat(1 + random.nextInt(20), minItemsPerBlock, maxItemsPerBlock),