LUCENE-3600: close searchers in test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1206817 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-11-27 19:52:40 +00:00
parent 8a6234e76c
commit dda0cd73a2
1 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,7 @@ public class TestBlockJoin extends LuceneTestCase {
Document parentDoc = s.doc(group.groupValue);
assertEquals("Lisa", parentDoc.get("name"));
s.close();
r.close();
dir.close();
}
@ -458,7 +459,9 @@ public class TestBlockJoin extends LuceneTestCase {
}
}
s.close();
r.close();
joinS.close();
joinR.close();
dir.close();
joinDir.close();
@ -590,6 +593,7 @@ public class TestBlockJoin extends LuceneTestCase {
assertEquals("Lisa", parentDoc.get("name"));
s.close();
r.close();
dir.close();
}
@ -614,6 +618,7 @@ public class TestBlockJoin extends LuceneTestCase {
Weight weight = s.createNormalizedWeight(q);
DocIdSetIterator disi = weight.scorer(ReaderUtil.leaves(s.getIndexReader().getTopReaderContext())[0], true, true, null);
assertEquals(1, disi.advance(1));
s.close();
r.close();
dir.close();
}
@ -648,6 +653,7 @@ public class TestBlockJoin extends LuceneTestCase {
Weight weight = s.createNormalizedWeight(q);
DocIdSetIterator disi = weight.scorer(ReaderUtil.leaves(s.getIndexReader().getTopReaderContext())[0], true, true, null);
assertEquals(2, disi.advance(0));
s.close();
r.close();
dir.close();
}