lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1587356 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/ solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
Date Mon, 14 Apr 2014 23:07:05 GMT
Author: markrmiller
Date: Mon Apr 14 23:07:05 2014
New Revision: 1587356

URL: http://svn.apache.org/r1587356
Log:
SOLR-5980: Add a test.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java?rev=1587356&r1=1587355&r2=1587356&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
Mon Apr 14 23:07:05 2014
@@ -214,11 +214,17 @@ public class SyncSliceTest extends Abstr
     
     // shard should be inconsistent
     shardFailMessage = waitTillInconsistent();
-    
     assertNotNull(
         "Test Setup Failure: shard1 should have just been set up to be inconsistent - but
it's still consistent. Leader:"
             + leaderJetty.url + " Dead Guy:" + deadJetty.url + "skip list:" + skipServers,
shardFailMessage);
     
+    // good place to test compareResults
+    boolean shouldFail = compareResults(
+        controlClient.query(new SolrQuery("*:*")).getResults().getNumFound(),
+        cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound());
+    assertTrue("A test that compareResults is working correctly failed",
+        shouldFail);
+    
     jetties = new HashSet<>();
     jetties.addAll(shardToJetty.get("shard1"));
     jetties.remove(leaderJetty);



Mime
View raw message