lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1358123 - /lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java
Date Fri, 06 Jul 2012 11:13:24 GMT
Author: rmuir
Date: Fri Jul  6 11:13:24 2012
New Revision: 1358123

URL: http://svn.apache.org/viewvc?rev=1358123&view=rev
Log:
LUCENE-4174: tone down @Slow test

Modified:
    lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java

Modified: lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java?rev=1358123&r1=1358122&r2=1358123&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java
(original)
+++ lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDuelingAnalyzers.java
Fri Jul  6 11:13:24 2012
@@ -31,7 +31,6 @@ import org.apache.lucene.analysis.tokena
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.automaton.Automaton;
 import org.apache.lucene.util.automaton.BasicOperations;
 import org.apache.lucene.util.automaton.CharacterRunAutomaton;
@@ -45,7 +44,6 @@ import org.apache.lucene.util.automaton.
  * Any tests here need to probably consider unicode version of the JRE (it could
  * cause false fails).
  */
-@Slow
 public class TestDuelingAnalyzers extends LuceneTestCase {
   private CharacterRunAutomaton jvmLetter;
   
@@ -76,7 +74,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    for (int i = 0; i < 10000; i++) {
+    for (int i = 0; i < 1000; i++) {
       String s = _TestUtil.randomSimpleString(random);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 
                    right.tokenStream("foo", newStringReader(s)));
@@ -96,7 +94,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    int numIterations = atLeast(100);
+    int numIterations = atLeast(50);
     for (int i = 0; i < numIterations; i++) {
       String s = _TestUtil.randomSimpleString(random, maxLength);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 
@@ -114,7 +112,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    for (int i = 0; i < 10000; i++) {
+    for (int i = 0; i < 1000; i++) {
       String s = _TestUtil.randomHtmlishString(random, 20);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 
                    right.tokenStream("foo", newStringReader(s)));
@@ -123,7 +121,7 @@ public class TestDuelingAnalyzers extend
   
   public void testLetterHtmlishHuge() throws Exception {
     Random random = random();
-    int maxLength = 2048; // this is number of elements, not chars!
+    int maxLength = 1024; // this is number of elements, not chars!
     MockAnalyzer left = new MockAnalyzer(random, jvmLetter, false);
     left.setMaxTokenLength(255); // match CharTokenizer's max token length
     Analyzer right = new Analyzer() {
@@ -133,7 +131,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    int numIterations = atLeast(100);
+    int numIterations = atLeast(50);
     for (int i = 0; i < numIterations; i++) {
       String s = _TestUtil.randomHtmlishString(random, maxLength);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 
@@ -151,7 +149,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    for (int i = 0; i < 10000; i++) {
+    for (int i = 0; i < 1000; i++) {
       String s = _TestUtil.randomUnicodeString(random);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 
                    right.tokenStream("foo", newStringReader(s)));
@@ -160,7 +158,7 @@ public class TestDuelingAnalyzers extend
   
   public void testLetterUnicodeHuge() throws Exception {
     Random random = random();
-    int maxLength = 8192; // CharTokenizer.IO_BUFFER_SIZE*2
+    int maxLength = 4300; // CharTokenizer.IO_BUFFER_SIZE + fudge
     MockAnalyzer left = new MockAnalyzer(random, jvmLetter, false);
     left.setMaxTokenLength(255); // match CharTokenizer's max token length
     Analyzer right = new Analyzer() {
@@ -170,7 +168,7 @@ public class TestDuelingAnalyzers extend
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
     };
-    int numIterations = atLeast(100);
+    int numIterations = atLeast(50);
     for (int i = 0; i < numIterations; i++) {
       String s = _TestUtil.randomUnicodeString(random, maxLength);
       assertEquals(s, left.tokenStream("foo", newStringReader(s)), 



Mime
View raw message