You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ji...@apache.org on 2019/06/25 08:37:17 UTC

[lucene-solr] branch branch_8x updated: LUCENE-8848: Fix IndexWriter leak when TestUnifiedHighlighter#testNotReanalyzed is ignored

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

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


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 6eb2c81  LUCENE-8848: Fix IndexWriter leak when TestUnifiedHighlighter#testNotReanalyzed is ignored
6eb2c81 is described below

commit 6eb2c81886ee07da3fbdaafd6da4c050662a6b28
Author: jimczi <ji...@elastic.co>
AuthorDate: Tue Jun 25 10:36:25 2019 +0200

    LUCENE-8848: Fix IndexWriter leak when TestUnifiedHighlighter#testNotReanalyzed is ignored
---
 .../org/apache/lucene/search/uhighlight/TestUnifiedHighlighter.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighter.java b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighter.java
index 2565e7e..1e20d43 100644
--- a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighter.java
+++ b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighter.java
@@ -1362,12 +1362,12 @@ public class TestUnifiedHighlighter extends LuceneTestCase {
   }
 
   public void testNotReanalyzed() throws Exception {
-    RandomIndexWriter iw = new RandomIndexWriter(random(), dir, indexAnalyzer);
-
     if (fieldType == UHTestHelper.reanalysisType) {
       return; // we're testing the *other* cases
     }
 
+    RandomIndexWriter iw = new RandomIndexWriter(random(), dir, indexAnalyzer);
+
     Field body = new Field("body", "", fieldType);
     Document doc = new Document();
     doc.add(body);