lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1641617 - /lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
Date Tue, 25 Nov 2014 13:39:15 GMT
Author: mikemccand
Date: Tue Nov 25 13:39:15 2014
New Revision: 1641617

URL: http://svn.apache.org/r1641617
Log:
fix test bug

Modified:
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=1641617&r1=1641616&r2=1641617&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
Tue Nov 25 13:39:15 2014
@@ -330,7 +330,8 @@ public class TestStressIndexing2 extends
     final Bits liveDocs2 = MultiFields.getLiveDocs(r2);
     
     Fields fields = MultiFields.getFields(r2);
-    if (fields.size() == 0) {
+    Terms terms2 = fields.terms(idField);
+    if (fields.size() == 0 || terms2 == null) {
       // make sure r1 is in fact empty (eg has only all
       // deleted docs):
       Bits liveDocs = MultiFields.getLiveDocs(r1);
@@ -343,7 +344,6 @@ public class TestStressIndexing2 extends
       }
       return;
     }
-    Terms terms2 = fields.terms(idField);
     TermsEnum termsEnum2 = terms2.iterator(null);
 
     DocsEnum termDocs1 = null;



Mime
View raw message