mirror of https://github.com/apache/lucene.git
fix test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1661836 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c2a84f0fa
commit
612e4544ef
|
@ -42,6 +42,7 @@ import org.apache.lucene.search.TermQuery;
|
|||
import org.apache.lucene.search.TopDocs;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.RamUsageTester;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
|
@ -79,6 +80,7 @@ public class TermsQueryTest extends LuceneTestCase {
|
|||
|
||||
if (reader.numDocs() == 0) {
|
||||
// may occasionally happen if all documents got the same term
|
||||
IOUtils.close(reader, dir);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue