You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/16 16:28:21 UTC

[lucene-solr] 01/02: @215 - Try to harden this test.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit d9f094148877bb8095c408f46f2d34914442e3ac
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Thu Jul 16 11:20:09 2020 -0500

    @215 - Try to harden this test.
---
 .../org/apache/solr/handler/tagger/RandomizedTaggerTest.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
index cb742a8..ec73f81 100644
--- a/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
@@ -39,7 +39,6 @@ import org.junit.Test;
 /**
  * Randomly generate taggable text and verify via simple tag algorithm.
  */
-@Repeat(iterations = 10)
 public class RandomizedTaggerTest extends TaggerTestCase {
 
   @BeforeClass
@@ -75,6 +74,15 @@ public class RandomizedTaggerTest extends TaggerTestCase {
           buf.append(RandomPicks.randomFrom(R, names));
         }
       }
+      // try to avoid:
+      // 'Exception writing document id 6 to the index; possible analysis error: input automaton is too large: 1001'
+      String name;
+      if (buf.length() > 150) {
+        name = buf.substring(0, 150);
+      } else {
+        name = buf.toString();
+      }
+
       names.add(buf.toString());
     }