mirror of https://github.com/apache/lucene.git
fix more linefiledocs leaks
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1326474 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fffdb569d0
commit
2b07186492
|
@ -173,6 +173,8 @@ public class TestReuseDocsEnum extends LuceneTestCase {
|
||||||
for (int i = 0; i < numdocs; i++) {
|
for (int i = 0; i < numdocs; i++) {
|
||||||
writer.addDocument(lineFileDocs.nextDoc());
|
writer.addDocument(lineFileDocs.nextDoc());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lineFileDocs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class TestCustomNorms extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
open.close();
|
open.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
|
docs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testExceptionOnRandomType() throws IOException {
|
public void testExceptionOnRandomType() throws IOException {
|
||||||
|
@ -126,6 +127,7 @@ public class TestCustomNorms extends LuceneTestCase {
|
||||||
writer.commit();
|
writer.commit();
|
||||||
writer.close();
|
writer.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
|
docs.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,8 @@ public class TestDuelingCodecs extends LuceneTestCase {
|
||||||
for (int i = 0; i < numdocs; i++) {
|
for (int i = 0; i < numdocs; i++) {
|
||||||
writer.addDocument(lineFileDocs.nextDoc());
|
writer.addDocument(lineFileDocs.nextDoc());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lineFileDocs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -100,5 +100,6 @@ public class TestForceMergeForever extends LuceneTestCase {
|
||||||
assertTrue("merge count is " + w.mergeCount.get(), w.mergeCount.get() <= 1);
|
assertTrue("merge count is " + w.mergeCount.get(), w.mergeCount.get() <= 1);
|
||||||
w.close();
|
w.close();
|
||||||
d.close();
|
d.close();
|
||||||
|
docs.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,7 @@ public class TestNorms extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
writer.commit();
|
writer.commit();
|
||||||
writer.close();
|
writer.close();
|
||||||
|
docs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ public class TestTermsEnum extends LuceneTestCase {
|
||||||
|
|
||||||
r.close();
|
r.close();
|
||||||
d.close();
|
d.close();
|
||||||
|
docs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDoc(RandomIndexWriter w, Collection<String> terms, Map<BytesRef,Integer> termToID, int id) throws IOException {
|
private void addDoc(RandomIndexWriter w, Collection<String> terms, Map<BytesRef,Integer> termToID, int id) throws IOException {
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class TestNRTCachingDirectory extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
r.close();
|
r.close();
|
||||||
cachedDir.close();
|
cachedDir.close();
|
||||||
|
docs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: not a test; just here to make sure the code frag
|
// NOTE: not a test; just here to make sure the code frag
|
||||||
|
|
Loading…
Reference in New Issue