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:39:46 UTC
lucene-solr:master: SOLR-12028: Remove BadApples for
LIRRollingUpdatesTest
Repository: lucene-solr
Updated Branches:
refs/heads/master 0031150fc -> a9fd0754b
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/a9fd0754
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a9fd0754
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a9fd0754
Branch: refs/heads/master
Commit: a9fd0754ba1a9e6349f4216abf3b46ae8ea320c3
Parents: 0031150
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:39:36 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/a9fd0754/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);
}