don't randomly pick Facet42 DocValuesFormat: it's not general purpose

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1503767 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-07-16 15:48:14 +00:00
parent 9c14f4a2fd
commit abfbd31c19
1 changed files with 5 additions and 2 deletions

View File

@ -18,10 +18,12 @@ package org.apache.lucene.util;
*/
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
@ -173,8 +175,9 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
final DocValuesFormat dvFormat;
if ("random".equals(TEST_DOCVALUESFORMAT)) {
// pick one from SPI
String formats[] = DocValuesFormat.availableDocValuesFormats().toArray(new String[0]);
dvFormat = DocValuesFormat.forName(formats[random.nextInt(formats.length)]);
List<String> formats = new ArrayList<String>(DocValuesFormat.availableDocValuesFormats());
formats.remove("Facet42");
dvFormat = DocValuesFormat.forName(formats.get(random.nextInt(formats.size())));
} else {
dvFormat = DocValuesFormat.forName(TEST_DOCVALUESFORMAT);
}