mirror of https://github.com/apache/lucene.git
SOLR-12028: Remove BadApples for LIRRollingUpdatesTest
This commit is contained in:
parent
0031150fca
commit
a9fd0754ba
|
@ -96,7 +96,6 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
|
|
||||||
public void testNewReplicaOldLeader() throws Exception {
|
public void testNewReplicaOldLeader() throws Exception {
|
||||||
|
|
||||||
String collection = "testNewReplicaOldLeader";
|
String collection = "testNewReplicaOldLeader";
|
||||||
|
@ -117,6 +116,8 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
|
||||||
.setProperties(oldLir)
|
.setProperties(oldLir)
|
||||||
.setNode(cluster.getJettySolrRunner(1).getNodeName())
|
.setNode(cluster.getJettySolrRunner(1).getNodeName())
|
||||||
.process(cluster.getSolrClient());
|
.process(cluster.getSolrClient());
|
||||||
|
waitForState("Time waiting for 1x2 collection", collection, clusterShape(1, 2));
|
||||||
|
|
||||||
addDocs(collection, 2, 0);
|
addDocs(collection, 2, 0);
|
||||||
|
|
||||||
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
||||||
|
@ -161,7 +162,6 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
|
|
||||||
public void testNewLeaderOldReplica() throws Exception {
|
public void testNewLeaderOldReplica() throws Exception {
|
||||||
// in case of new leader & old replica, new leader can still put old replica into LIR
|
// 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)
|
.setProperties(oldLir)
|
||||||
.setNode(cluster.getJettySolrRunner(1).getNodeName())
|
.setNode(cluster.getJettySolrRunner(1).getNodeName())
|
||||||
.process(cluster.getSolrClient());
|
.process(cluster.getSolrClient());
|
||||||
|
waitForState("Time waiting for 1x2 collection", collection, clusterShape(1, 2));
|
||||||
|
|
||||||
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
||||||
Replica notLeader = shard1.getReplicas(x -> x != shard1.getLeader()).get(0);
|
Replica notLeader = shard1.getReplicas(x -> x != shard1.getLeader()).get(0);
|
||||||
|
@ -257,6 +258,7 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
|
||||||
.addReplicaToShard(collection, "shard1")
|
.addReplicaToShard(collection, "shard1")
|
||||||
.setNode(cluster.getJettySolrRunner(2).getNodeName())
|
.setNode(cluster.getJettySolrRunner(2).getNodeName())
|
||||||
.process(cluster.getSolrClient());
|
.process(cluster.getSolrClient());
|
||||||
|
waitForState("Timeout waiting for shard1 become active", collection, clusterShape(1, 3));
|
||||||
|
|
||||||
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
Slice shard1 = getCollectionState(collection).getSlice("shard1");
|
||||||
Replica replicaInOldMode = shard1.getReplicas(x -> x != shard1.getLeader()).get(0);
|
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,
|
waitForState("Replica " + replicaInOldMode.getName() + " is not put as DOWN", collection,
|
||||||
(liveNodes, collectionState) ->
|
(liveNodes, collectionState) ->
|
||||||
collectionState.getSlice("shard1").getReplica(finalReplicaInOldMode.getName()).getState() == Replica.State.DOWN);
|
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
|
// wait a little bit
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
|
@ -324,13 +330,11 @@ public class LIRRollingUpdatesTest extends SolrCloudTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
|
|
||||||
public void testNewLeaderAndMixedReplicas() throws Exception {
|
public void testNewLeaderAndMixedReplicas() throws Exception {
|
||||||
testLeaderAndMixedReplicas(false);
|
testLeaderAndMixedReplicas(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
|
|
||||||
public void testOldLeaderAndMixedReplicas() throws Exception {
|
public void testOldLeaderAndMixedReplicas() throws Exception {
|
||||||
testLeaderAndMixedReplicas(true);
|
testLeaderAndMixedReplicas(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue