close DirectoryReader in test

This commit is contained in:
Shai Erera 2018-12-04 16:37:35 +02:00
parent f637c50c11
commit ca4555ed93
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,6 @@ public class TestDocValues extends LuceneTestCase {
iw.close();
DirectoryReader dr = DirectoryReader.open(zeroDir);
for (int id = 0 ; id < docValues.size() ; id++) {
int readerIndex = dr.readerIndex(id);
// 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",
docValues.get(id), Long.valueOf(numDV.longValue()));
}
dr.close();
// Clean up
deleteAndClose(zeroDir);