jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1687223 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java
Date Wed, 24 Jun 2015 10:21:04 GMT
Author: unico
Date: Wed Jun 24 10:21:04 2015
New Revision: 1687223

URL: http://svn.apache.org/r1687223
Log:
verify double check works in for multiple entries errors

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java?rev=1687223&r1=1687222&r2=1687223&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SearchIndexConsistencyCheckTest.java
Wed Jun 24 10:21:04 2015
@@ -254,10 +254,22 @@ public class SearchIndexConsistencyCheck
         assertEquals("Expected 1 index consistency error", 1, errors.size());
         assertEquals("Different node was reported to be duplicate", errors.get(0).id, fooId);
 
+        consistencyCheck.doubleCheckErrors();
+        errors = consistencyCheck.getErrors();
+
+        assertEquals("Expected 1 index consistency error after double check", 1, errors.size());
+        assertEquals("Different node was reported to be duplicate after double check", errors.get(0).id,
fooId);
+
         consistencyCheck.repair(false);
 
         assertTrue("Index was not repaired properly", searchIndexContainsNode(searchIndex,
fooId));
-        assertTrue("Consistency check still reports errors", searchIndex.runConsistencyCheck().getErrors().isEmpty());
+
+        consistencyCheck.doubleCheckErrors();
+        errors = consistencyCheck.getErrors();
+
+        assertTrue("Consistency double check of multiple entries failed", errors.isEmpty());
+        assertTrue("Consistency check still finds errors", searchIndex.runConsistencyCheck().getErrors().isEmpty());
+
     }
 
     /**



Mime
View raw message