You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/03/12 10:40:24 UTC

lucene-solr:branch_7x: SOLR-12028: Remove BadApples for LIRRollingUpdatesTest

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x d409df023 -> 2f2be4317


SOLR-12028: Remove BadApples for LIRRollingUpdatesTest


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2f2be431
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2f2be431
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2f2be431

Branch: refs/heads/branch_7x
Commit: 2f2be43170cf973eee771646f7729a89c95f00df
Parents: d409df0
Author: Cao Manh Dat <da...@apache.org>
Authored: Mon Mar 12 17:39:36 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Mon Mar 12 17:40:10 2018 +0700

----------------------------------------------------------------------
 .../org/apache/solr/cloud/LIRRollingUpdatesTest.java    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2f2be431/solr/core/src/test/org/apache/solr/cloud/LIRRollingUpdatesTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/LIRRollingUpdatesTest.java b/solr/core/src/test/org/apache/solr/cloud/LIRRollingUpdatesTest.java
index af7cab5..713a6ba 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LIRRollingUpdatesTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LIRRollingUpdatesTest.java
@@ -96,7 +96,6 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
   }
 
   @Test
-  @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
   public void testNewReplicaOldLeader() throws Exception {
 
     String collection = "testNewReplicaOldLeader";
@@ -117,6 +116,8 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
         .setProperties(oldLir)
         .setNode(cluster.getJettySolrRunner(1).getNodeName())
         .process(cluster.getSolrClient());
+    waitForState("Time waiting for 1x2 collection", collection, clusterShape(1, 2));
+
     addDocs(collection, 2, 0);
 
     Slice shard1 = getCollectionState(collection).getSlice("shard1");
@@ -161,7 +162,6 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
   }
 
   @Test
-  @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
   public void testNewLeaderOldReplica() throws Exception {
     // in case of new leader & old replica, new leader can still put old replica into LIR
 
@@ -187,6 +187,7 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
         .setProperties(oldLir)
         .setNode(cluster.getJettySolrRunner(1).getNodeName())
         .process(cluster.getSolrClient());
+    waitForState("Time waiting for 1x2 collection", collection, clusterShape(1, 2));
 
     Slice shard1 = getCollectionState(collection).getSlice("shard1");
     Replica notLeader = shard1.getReplicas(x -> x != shard1.getLeader()).get(0);
@@ -257,6 +258,7 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
         .addReplicaToShard(collection, "shard1")
         .setNode(cluster.getJettySolrRunner(2).getNodeName())
         .process(cluster.getSolrClient());
+    waitForState("Timeout waiting for shard1 become active", collection, clusterShape(1, 3));
 
     Slice shard1 = getCollectionState(collection).getSlice("shard1");
     Replica replicaInOldMode = shard1.getReplicas(x -> x != shard1.getLeader()).get(0);
@@ -286,6 +288,10 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
     waitForState("Replica " + replicaInOldMode.getName() + " is not put as DOWN", collection,
         (liveNodes, collectionState) ->
             collectionState.getSlice("shard1").getReplica(finalReplicaInOldMode.getName()).getState() == Replica.State.DOWN);
+    Replica finalReplicaInNewMode = replicaInNewMode;
+    waitForState("Replica " + finalReplicaInNewMode.getName() + " is not put as DOWN", collection,
+        (liveNodes, collectionState) ->
+            collectionState.getSlice("shard1").getReplica(finalReplicaInNewMode.getName()).getState() == Replica.State.DOWN);
 
     // wait a little bit
     Thread.sleep(500);
@@ -324,13 +330,11 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
   }
 
   @Test
-  @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
   public void testNewLeaderAndMixedReplicas() throws Exception {
     testLeaderAndMixedReplicas(false);
   }
 
   @Test
-  @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
   public void testOldLeaderAndMixedReplicas() throws Exception {
     testLeaderAndMixedReplicas(true);
   }