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 LineFileDocs docs = new LineFileDocs(random);
|
||||||
final File tempDir = _TestUtil.getTempDir("nrtopenfiles");
|
final File tempDir = _TestUtil.getTempDir("nrtopenfiles");
|
||||||
final MockDirectoryWrapper dir = newFSDirectory(tempDir);
|
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));
|
final IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random));
|
||||||
|
|
||||||
if (LuceneTestCase.TEST_NIGHTLY) {
|
if (LuceneTestCase.TEST_NIGHTLY) {
|
||||||
|
@ -565,8 +566,10 @@ public class TestNRTThreads extends LuceneTestCase {
|
||||||
|
|
||||||
assertFalse(writer.anyNonBulkMerges);
|
assertFalse(writer.anyNonBulkMerges);
|
||||||
writer.close(false);
|
writer.close(false);
|
||||||
|
_TestUtil.checkIndex(dir);
|
||||||
s.close();
|
s.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
|
_TestUtil.rmDir(tempDir);
|
||||||
docs.close();
|
docs.close();
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
System.out.println("TEST: done [" + (System.currentTimeMillis()-t0) + " ms]");
|
System.out.println("TEST: done [" + (System.currentTimeMillis()-t0) + " ms]");
|
||||||
|
|
Loading…
Reference in New Issue