mirror of https://github.com/apache/lucene.git
LUCENE-3176: checkindex/close ourselves for safety and to support tests.iter
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1133385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8df95b97ef
commit
e934e3849f
|
@ -104,6 +104,7 @@ public class TestNRTThreads extends LuceneTestCase {
|
|||
final LineFileDocs docs = new LineFileDocs(random);
|
||||
final File tempDir = _TestUtil.getTempDir("nrtopenfiles");
|
||||
final MockDirectoryWrapper dir = newFSDirectory(tempDir);
|
||||
dir.setCheckIndexOnClose(false); // don't double-checkIndex, we do it ourselves.
|
||||
final IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random));
|
||||
|
||||
if (LuceneTestCase.TEST_NIGHTLY) {
|
||||
|
@ -565,8 +566,10 @@ public class TestNRTThreads extends LuceneTestCase {
|
|||
|
||||
assertFalse(writer.anyNonBulkMerges);
|
||||
writer.close(false);
|
||||
_TestUtil.checkIndex(dir);
|
||||
s.close();
|
||||
dir.close();
|
||||
_TestUtil.rmDir(tempDir);
|
||||
docs.close();
|
||||
if (VERBOSE) {
|
||||
System.out.println("TEST: done [" + (System.currentTimeMillis()-t0) + " ms]");
|
||||
|
|
Loading…
Reference in New Issue