SOLR-12028: Remove BadApples for LIRRollingUpdatesTest

This commit is contained in:
Cao Manh Dat 2018-03-12 17:39:36 +07:00
parent 0031150fca
commit a9fd0754ba
1 changed files with 8 additions and 4 deletions

View File

@ -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);
}