mirror of https://github.com/apache/lucene.git
close DirectoryReader in test
This commit is contained in:
parent
f637c50c11
commit
ca4555ed93
|
@ -206,7 +206,6 @@ public class TestDocValues extends LuceneTestCase {
|
||||||
iw.close();
|
iw.close();
|
||||||
|
|
||||||
DirectoryReader dr = DirectoryReader.open(zeroDir);
|
DirectoryReader dr = DirectoryReader.open(zeroDir);
|
||||||
|
|
||||||
for (int id = 0 ; id < docValues.size() ; id++) {
|
for (int id = 0 ; id < docValues.size() ; id++) {
|
||||||
int readerIndex = dr.readerIndex(id);
|
int readerIndex = dr.readerIndex(id);
|
||||||
// We create a new reader each time as we want to test vBPV-skipping and not sequential iteration
|
// We create a new reader each time as we want to test vBPV-skipping and not sequential iteration
|
||||||
|
@ -215,6 +214,7 @@ public class TestDocValues extends LuceneTestCase {
|
||||||
assertEquals(designation + ": The value for docID " + id + " should be as expected",
|
assertEquals(designation + ": The value for docID " + id + " should be as expected",
|
||||||
docValues.get(id), Long.valueOf(numDV.longValue()));
|
docValues.get(id), Long.valueOf(numDV.longValue()));
|
||||||
}
|
}
|
||||||
|
dr.close();
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
deleteAndClose(zeroDir);
|
deleteAndClose(zeroDir);
|
||||||
|
|
Loading…
Reference in New Issue