You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2013/07/16 17:48:37 UTC

svn commit: r1503768 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/test-framework/ lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java

Author: mikemccand
Date: Tue Jul 16 15:48:37 2013
New Revision: 1503768

URL: http://svn.apache.org/r1503768
Log:
don't randomly pick Facet42 DocValuesFormat: it's not general purpose

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java

Modified: lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java?rev=1503768&r1=1503767&r2=1503768&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java (original)
+++ lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java Tue Jul 16 15:48:37 2013
@@ -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;
@@ -183,8 +185,9 @@ final class TestRuleSetupAndRestoreClass
       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);
       }