lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1713670 - /lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
Date Tue, 10 Nov 2015 15:31:39 GMT
Author: sarowe
Date: Tue Nov 10 15:31:39 2015
New Revision: 1713670

URL: http://svn.apache.org/viewvc?rev=1713670&view=rev
Log:
SOLR-8249: Address OverseerTest.testOverseerStatsReset() failures by switching back from testing
for stats on the LEADER operation to testing STATE message stats (merged trunk r1713669)

Modified:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java?rev=1713670&r1=1713669&r2=1713670&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
Tue Nov 10 15:31:39 2015
@@ -716,18 +716,9 @@ public class OverseerTest extends SolrTe
       overseerElector.setup(ec);
       overseerElector.joinElection(ec, false);
 
-      mockController.publishState(collection, "core1", "core_node1", Replica.State.RECOVERING,
1);
+      mockController.publishState(collection, "core1", "core_node1", Replica.State.ACTIVE,
1);
 
-      // Wait till the leader election has finished
-      long maxWaitTimeForLeaderElection = 5000;
-      for (int i = 0; i < maxWaitTimeForLeaderElection / 200; i++) {
-        if (overseer.getStats().getSuccessCount(OverseerAction.LEADER.toLower()) > 0)
{
-          break;
-        }
-        Thread.sleep(200);
-      }
       assertNotNull(overseer.getStats());
-      assertEquals(1, (overseer.getStats().getSuccessCount(OverseerAction.LEADER.toLower())));
       assertTrue((overseer.getStats().getSuccessCount(OverseerAction.STATE.toLower())) >
0);
 
       // shut it down
@@ -738,7 +729,7 @@ public class OverseerTest extends SolrTe
       overseerElector.setup(ec);
       overseerElector.joinElection(ec, false);
       assertNotNull(overseer.getStats());
-      assertEquals(0, (overseer.getStats().getSuccessCount(OverseerAction.LEADER.toLower())));
+      assertEquals(0, (overseer.getStats().getSuccessCount(OverseerAction.STATE.toLower())));
 
     } finally {
       close(mockController);



Mime
View raw message