lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1433179 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
Date Mon, 14 Jan 2013 22:31:32 GMT
Author: mikemccand
Date: Mon Jan 14 22:31:14 2013
New Revision: 1433179

URL: http://svn.apache.org/viewvc?rev=1433179&view=rev
Log:
fix test bug

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java?rev=1433179&r1=1433178&r2=1433179&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
Mon Jan 14 22:31:14 2013
@@ -356,16 +356,20 @@ public class TestIndexWriterWithThreads 
         StackTraceElement[] trace = new Exception().getStackTrace();
         boolean sawAbortOrFlushDoc = false;
         boolean sawClose = false;
+        boolean sawMerge = false;
         for (int i = 0; i < trace.length; i++) {
           if ("abort".equals(trace[i].getMethodName()) ||
               "finishDocument".equals(trace[i].getMethodName())) {
             sawAbortOrFlushDoc = true;
           }
+          if ("merge".equals(trace[i])) {
+            sawMerge = true;
+          }
           if ("close".equals(trace[i].getMethodName())) {
             sawClose = true;
           }
         }
-        if (sawAbortOrFlushDoc && !sawClose) {
+        if (sawAbortOrFlushDoc && !sawClose && !sawMerge) {
           if (onlyOnce)
             doFail = false;
           //System.out.println(Thread.currentThread().getName() + ": now fail");



Mime
View raw message