lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1637082 - in /lucene/dev/branches/lucene_solr_4_10: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/analysis/ lucene/core/src/test/org/apache/lucene/util/automaton/ lucene/test-framework/ lucene/test-framework/src/java/org/a...
Date Thu, 06 Nov 2014 11:26:11 GMT
Author: mikemccand
Date: Thu Nov  6 11:26:10 2014
New Revision: 1637082

URL: http://svn.apache.org/r1637082
Log:
LUCENE-6046: remove det state limit for all AutomatonTestUtil.randomAutomaton since they can
become biggish

Modified:
    lucene/dev/branches/lucene_solr_4_10/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/lucene/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java
    lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestAutomaton.java
    lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestDeterminism.java
    lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestMinimize.java
    lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java?rev=1637082&r1=1637081&r2=1637082&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java
Thu Nov  6 11:26:10 2014
@@ -234,7 +234,7 @@ public class TestMockAnalyzer extends Ba
   public void testRandomRegexps() throws Exception {
     int iters = atLeast(30);
     for (int i = 0; i < iters; i++) {
-      final CharacterRunAutomaton dfa = new CharacterRunAutomaton(AutomatonTestUtil.randomAutomaton(random()));
+      final CharacterRunAutomaton dfa = new CharacterRunAutomaton(AutomatonTestUtil.randomAutomaton(random()),
Integer.MAX_VALUE);
       final boolean lowercase = random().nextBoolean();
       final int limit = TestUtil.nextInt(random(), 0, 500);
       Analyzer a = new Analyzer() {

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestAutomaton.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestAutomaton.java?rev=1637082&r1=1637081&r2=1637082&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestAutomaton.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestAutomaton.java
Thu Nov  6 11:26:10 2014
@@ -260,8 +260,8 @@ public class TestAutomaton extends Lucen
       Automaton ra = Operations.reverse(a);
       Automaton rra = Operations.reverse(ra);
       assertTrue(Operations.sameLanguage(
-        Operations.determinize(Operations.removeDeadStates(a), DEFAULT_MAX_DETERMINIZED_STATES),
-        Operations.determinize(Operations.removeDeadStates(rra), DEFAULT_MAX_DETERMINIZED_STATES)));
+        Operations.determinize(Operations.removeDeadStates(a), Integer.MAX_VALUE),
+        Operations.determinize(Operations.removeDeadStates(rra), Integer.MAX_VALUE)));
     }
   }
 
@@ -274,7 +274,7 @@ public class TestAutomaton extends Lucen
         a = Operations.removeDeadStates(a);
       }
       Automaton ra = Operations.reverse(a);
-      Automaton rda = Operations.determinize(ra, DEFAULT_MAX_DETERMINIZED_STATES);
+      Automaton rda = Operations.determinize(ra, Integer.MAX_VALUE);
 
       if (Operations.isEmpty(a)) {
         assertTrue(Operations.isEmpty(rda));
@@ -362,9 +362,9 @@ public class TestAutomaton extends Lucen
       }
 
       assertTrue(Operations.sameLanguage(
-        Operations.determinize(Operations.removeDeadStates(a), DEFAULT_MAX_DETERMINIZED_STATES),
+        Operations.determinize(Operations.removeDeadStates(a), Integer.MAX_VALUE),
         Operations.determinize(Operations.removeDeadStates(builder.finish()),
-          DEFAULT_MAX_DETERMINIZED_STATES)));
+          Integer.MAX_VALUE)));
     }
   }
 

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestDeterminism.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestDeterminism.java?rev=1637082&r1=1637081&r2=1637082&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestDeterminism.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestDeterminism.java
Thu Nov  6 11:26:10 2014
@@ -41,7 +41,7 @@ public class TestDeterminism extends Luc
     for (int i = 0; i < num; i++) {
       Automaton a = AutomatonTestUtil.randomAutomaton(random());
       a = AutomatonTestUtil.determinizeSimple(a);
-      Automaton b = Operations.determinize(a, DEFAULT_MAX_DETERMINIZED_STATES);
+      Automaton b = Operations.determinize(a, Integer.MAX_VALUE);
       // TODO: more verifications possible?
       assertTrue(Operations.sameLanguage(a, b));
     }

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestMinimize.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestMinimize.java?rev=1637082&r1=1637081&r2=1637082&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestMinimize.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/test/org/apache/lucene/util/automaton/TestMinimize.java
Thu Nov  6 11:26:10 2014
@@ -19,8 +19,6 @@ package org.apache.lucene.util.automaton
 
 import org.apache.lucene.util.LuceneTestCase;
 
-import static org.apache.lucene.util.automaton.Operations.DEFAULT_MAX_DETERMINIZED_STATES;
-
 /** 
  * This test builds some randomish NFA/DFA and minimizes them.
  */
@@ -31,9 +29,9 @@ public class TestMinimize extends Lucene
     for (int i = 0; i < num; i++) {
       Automaton a = AutomatonTestUtil.randomAutomaton(random());
       Automaton la = Operations.determinize(Operations.removeDeadStates(a),
-        DEFAULT_MAX_DETERMINIZED_STATES);
+        Integer.MAX_VALUE);
       Automaton lb = MinimizationOperations.minimize(a,
-        DEFAULT_MAX_DETERMINIZED_STATES);
+        Integer.MAX_VALUE);
       assertTrue(Operations.sameLanguage(la, lb));
     }
   }
@@ -47,7 +45,7 @@ public class TestMinimize extends Lucene
       Automaton a = AutomatonTestUtil.randomAutomaton(random());
       a = AutomatonTestUtil.minimizeSimple(a);
       Automaton b = MinimizationOperations.minimize(a,
-        DEFAULT_MAX_DETERMINIZED_STATES);
+        Integer.MAX_VALUE);
       assertTrue(Operations.sameLanguage(a, b));
       assertEquals(a.getNumStates(), b.getNumStates());
       int numStates = a.getNumStates();

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java?rev=1637082&r1=1637081&r2=1637082&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java
Thu Nov  6 11:26:10 2014
@@ -54,8 +54,8 @@ import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.UnicodeUtil;
 import org.apache.lucene.util.Version;
 import org.apache.lucene.util.automaton.Automaton;
-import org.apache.lucene.util.automaton.AutomatonTestUtil.RandomAcceptedStrings;
 import org.apache.lucene.util.automaton.AutomatonTestUtil;
+import org.apache.lucene.util.automaton.AutomatonTestUtil.RandomAcceptedStrings;
 import org.apache.lucene.util.automaton.CompiledAutomaton;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -1103,7 +1103,7 @@ public abstract class BasePostingsFormat
     for(String field : fields.keySet()) {
       while (true) {
         Automaton a = AutomatonTestUtil.randomAutomaton(random());
-        CompiledAutomaton ca = new CompiledAutomaton(a);
+        CompiledAutomaton ca = new CompiledAutomaton(a, null, true, Integer.MAX_VALUE);
         if (ca.type != CompiledAutomaton.AUTOMATON_TYPE.NORMAL) {
           // Keep retrying until we get an A that will really "use" the PF's intersect code:
           continue;



Mime
View raw message