less simpletext, less simplefsdir, put directdv in rotation

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1642209 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-11-27 18:58:15 +00:00
parent cee3a963e7
commit 673c2bde45
2 changed files with 12 additions and 2 deletions

View File

@ -37,6 +37,7 @@ import org.apache.lucene.codecs.blockterms.LuceneVarGapDocFreqInterval;
import org.apache.lucene.codecs.blockterms.LuceneVarGapFixedInterval;
import org.apache.lucene.codecs.blocktreeords.BlockTreeOrdsPostingsFormat;
import org.apache.lucene.codecs.bloom.TestBloomFilteredLucenePostings;
import org.apache.lucene.codecs.memory.DirectDocValuesFormat;
import org.apache.lucene.codecs.memory.DirectPostingsFormat;
import org.apache.lucene.codecs.memory.FSTOrdPostingsFormat;
import org.apache.lucene.codecs.memory.FSTPostingsFormat;
@ -136,15 +137,16 @@ public class RandomCodec extends AssertingCodec {
new LuceneFixedGap(TestUtil.nextInt(random, 1, 1000)),
new LuceneVarGapFixedInterval(TestUtil.nextInt(random, 1, 1000)),
new LuceneVarGapDocFreqInterval(TestUtil.nextInt(random, 1, 100), TestUtil.nextInt(random, 1, 1000)),
new SimpleTextPostingsFormat(),
random.nextInt(10) == 0 ? new SimpleTextPostingsFormat() : TestUtil.getDefaultPostingsFormat(),
new AssertingPostingsFormat(),
new MemoryPostingsFormat(true, random.nextFloat()),
new MemoryPostingsFormat(false, random.nextFloat()));
addDocValues(avoidCodecs,
TestUtil.getDefaultDocValuesFormat(),
new DirectDocValuesFormat(), // maybe not a great idea...
new MemoryDocValuesFormat(),
new SimpleTextDocValuesFormat(),
random.nextInt(10) == 0 ? new SimpleTextDocValuesFormat() : TestUtil.getDefaultDocValuesFormat(),
new AssertingDocValuesFormat());
Collections.shuffle(formats, random);

View File

@ -1291,6 +1291,10 @@ public abstract class LuceneTestCase extends Assert {
String fsdirClass = TEST_DIRECTORY;
if (fsdirClass.equals("random")) {
fsdirClass = RandomPicks.randomFrom(random(), FS_DIRECTORIES);
if (fsdirClass.equals("SimpleFSDirectory")) {
// pick again
fsdirClass = RandomPicks.randomFrom(random(), FS_DIRECTORIES);
}
}
Class<? extends FSDirectory> clazz;
@ -1517,6 +1521,10 @@ public abstract class LuceneTestCase extends Assert {
if (clazzName.equals("random")) {
if (rarely(random)) {
clazzName = RandomPicks.randomFrom(random, CORE_DIRECTORIES);
if (clazzName.equals("SimpleFSDirectory")) {
// pick again
clazzName = RandomPicks.randomFrom(random, CORE_DIRECTORIES);
}
} else {
clazzName = "RAMDirectory";
}