lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r804472 - /lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Date Sat, 15 Aug 2009 14:05:01 GMT
Author: mikemccand
Date: Sat Aug 15 14:05:01 2009
New Revision: 804472

URL: http://svn.apache.org/viewvc?rev=804472&view=rev
Log:
LUCENE-1811: fix thread safety bug in testcase

Modified:
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=804472&r1=804471&r2=804472&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Sat Aug 15 14:05:01 2009
@@ -635,7 +635,7 @@
           modifier.close();
         } else if (i % 3 == 1) {
           IndexReader modifier = IndexReader.open(dir);
-          modifier.deleteDocument(i);
+          modifier.deleteDocument(i % modifier.maxDoc());
           modifier.close();
         } else {
           IndexWriter modifier = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);



Mime
View raw message