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 2014/03/08 12:14:49 UTC

svn commit: r1575520 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java

Author: mikemccand
Date: Sat Mar  8 11:14:48 2014
New Revision: 1575520

URL: http://svn.apache.org/r1575520
Log:
fix test to prune mega-long terms

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java?rev=1575520&r1=1575519&r2=1575520&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java Sat Mar  8 11:14:48 2014
@@ -46,7 +46,10 @@ public class TestRollingUpdates extends 
       Codec.setDefault(TestUtil.alwaysPostingsFormat(new MemoryPostingsFormat(random().nextBoolean(), random.nextFloat())));
     }
 
-    final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
+    MockAnalyzer analyzer = new MockAnalyzer(random());
+    analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
+
+    final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer));
     final int SIZE = atLeast(20);
     int id = 0;
     IndexReader r = null;