lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1133385 - /lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
Date Wed, 08 Jun 2011 13:08:01 GMT
Author: rmuir
Date: Wed Jun  8 13:08:00 2011
New Revision: 1133385

URL: http://svn.apache.org/viewvc?rev=1133385&view=rev
Log:
LUCENE-3176: checkindex/close ourselves for safety and to support tests.iter

Modified:
    lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java?rev=1133385&r1=1133384&r2=1133385&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java Wed Jun 
8 13:08:00 2011
@@ -104,6 +104,7 @@ public class TestNRTThreads extends Luce
     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 Luce
 
     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]");



Mime
View raw message