LUCENE-8848: Fix IndexWriter leak when TestUnifiedHighlighter#testNotReanalyzed is ignored

This commit is contained in:
jimczi 2019-06-25 10:36:25 +02:00
parent 8199ad48b5
commit 6eb2c81886
1 changed files with 2 additions and 2 deletions

View File

@ -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);