diff --git a/src/test/org/apache/lucene/index/TestIndexWriter.java b/src/test/org/apache/lucene/index/TestIndexWriter.java index a4f312a2919..d6e3249a4f1 100644 --- a/src/test/org/apache/lucene/index/TestIndexWriter.java +++ b/src/test/org/apache/lucene/index/TestIndexWriter.java @@ -2257,6 +2257,7 @@ public class TestIndexWriter extends LuceneTestCase AlreadyClosedException ace; IndexWriter writer; boolean noErrors; + volatile int addCount; public IndexerThread(IndexWriter writer, boolean noErrors) { this.writer = writer; @@ -2275,6 +2276,7 @@ public class TestIndexWriter extends LuceneTestCase while(System.currentTimeMillis() < stopTime) { try { writer.updateDocument(new Term("id", ""+(idUpto++)), doc); + addCount++; } catch (IOException ioe) { //ioe.printStackTrace(System.out); if (ioe.getMessage().startsWith("fake disk full at") || @@ -2332,10 +2334,19 @@ public class TestIndexWriter extends LuceneTestCase for(int i=0;i 0) { + done = true; + break; + } } writer.close(false);