lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject lucene-solr:branch_6x: LUCENE-7445: fix test bug
Date Sun, 11 Sep 2016 17:22:33 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x ed7643770 -> 3cfe547f5


LUCENE-7445: fix test bug


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3cfe547f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3cfe547f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3cfe547f

Branch: refs/heads/branch_6x
Commit: 3cfe547f5bbbca7e5e3cad58f8e0760637bdd9e1
Parents: ed76437
Author: Mike McCandless <mikemccand@apache.org>
Authored: Sun Sep 11 13:22:19 2016 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Sun Sep 11 13:22:19 2016 -0400

----------------------------------------------------------------------
 .../src/test/org/apache/lucene/search/TestSearcherManager.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3cfe547f/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java b/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
index 09b3e42..2fac35f 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
@@ -539,7 +539,9 @@ public class TestSearcherManager extends ThreadedIndexingAndSearchingTestCase
{
   public void testConcurrentIndexCloseSearchAndRefresh() throws Exception {
     final Directory dir = newFSDirectory(createTempDir());
     AtomicReference<IndexWriter> writerRef = new AtomicReference<>();
-    writerRef.set(new IndexWriter(dir, newIndexWriterConfig()));
+    final MockAnalyzer analyzer = new MockAnalyzer(random());
+    analyzer.setMaxTokenLength(IndexWriter.MAX_TERM_LENGTH);
+    writerRef.set(new IndexWriter(dir, newIndexWriterConfig(analyzer)));
 
     AtomicReference<SearcherManager> mgrRef = new AtomicReference<>();
     mgrRef.set(new SearcherManager(writerRef.get(), null));
@@ -561,7 +563,7 @@ public class TestSearcherManager extends ThreadedIndexingAndSearchingTestCase
{
                 } else {
                   w.rollback();
                 }
-                writerRef.set(new IndexWriter(dir, newIndexWriterConfig()));
+                writerRef.set(new IndexWriter(dir, newIndexWriterConfig(analyzer)));
               }
             }
             docs.close();


Mime
View raw message