mirror of https://github.com/apache/lucene.git
LUCENE-8848: Fix IndexWriter leak when TestUnifiedHighlighter#testNotReanalyzed is ignored
This commit is contained in:
parent
8199ad48b5
commit
6eb2c81886
|
@ -1362,12 +1362,12 @@ public class TestUnifiedHighlighter extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNotReanalyzed() throws Exception {
|
public void testNotReanalyzed() throws Exception {
|
||||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, indexAnalyzer);
|
|
||||||
|
|
||||||
if (fieldType == UHTestHelper.reanalysisType) {
|
if (fieldType == UHTestHelper.reanalysisType) {
|
||||||
return; // we're testing the *other* cases
|
return; // we're testing the *other* cases
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RandomIndexWriter iw = new RandomIndexWriter(random(), dir, indexAnalyzer);
|
||||||
|
|
||||||
Field body = new Field("body", "", fieldType);
|
Field body = new Field("body", "", fieldType);
|
||||||
Document doc = new Document();
|
Document doc = new Document();
|
||||||
doc.add(body);
|
doc.add(body);
|
||||||
|
|
Loading…
Reference in New Issue