mirror of https://github.com/apache/lucene.git
tests: fix resource leaks
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1022793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c04165596
commit
4c2744172c
|
@ -145,7 +145,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
|
|||
spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, "spellchecker1");
|
||||
args.add("spellchecker", spellchecker);
|
||||
|
||||
// TODO: this is really fragile - find a higher level way to test this.
|
||||
// TODO: this is really fragile and error prone - find a higher level way to test this.
|
||||
SpellCheckComponent checker = new SpellCheckComponent();
|
||||
checker.init(args);
|
||||
checker.inform(h.getCore());
|
||||
|
@ -164,6 +164,8 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
|
|||
} catch (NullPointerException e) {
|
||||
fail("NullPointerException due to reload not initializing analyzers");
|
||||
}
|
||||
|
||||
rb.req.close();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
Loading…
Reference in New Issue