mirror of https://github.com/apache/lucene.git
SOLR-5311 trying to stop test failures
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1538254 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6befc56d8c
commit
5e87b67337
|
@ -119,9 +119,6 @@ public class DeleteReplicaTest extends AbstractFullDistribZkTestBase {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void deleteLiveReplicaTest() throws Exception{
|
private void deleteLiveReplicaTest() throws Exception{
|
||||||
String COLL_NAME = "delLiveColl";
|
String COLL_NAME = "delLiveColl";
|
||||||
CloudSolrServer client = createCloudClient(null);
|
CloudSolrServer client = createCloudClient(null);
|
||||||
|
@ -129,9 +126,13 @@ public class DeleteReplicaTest extends AbstractFullDistribZkTestBase {
|
||||||
DocCollection testcoll = getCommonCloudSolrServer().getZkStateReader().getClusterState().getCollection(COLL_NAME);
|
DocCollection testcoll = getCommonCloudSolrServer().getZkStateReader().getClusterState().getCollection(COLL_NAME);
|
||||||
final Slice shard1 = testcoll.getSlices().iterator().next();
|
final Slice shard1 = testcoll.getSlices().iterator().next();
|
||||||
if(!shard1.getState().equals(Slice.ACTIVE)) fail("shard is not active");
|
if(!shard1.getState().equals(Slice.ACTIVE)) fail("shard is not active");
|
||||||
Replica replica = shard1.getReplicas().iterator().next();
|
boolean found = false;
|
||||||
|
Replica replica1 = null;
|
||||||
|
for (Replica replica : shard1.getReplicas()) if("active".equals(replica.getStr("state"))) replica1 =replica;
|
||||||
|
|
||||||
removeAndWaitForReplicaGone(COLL_NAME, client, replica, shard1.getName());
|
if(replica1 == null) fail("no active relicas found");
|
||||||
|
|
||||||
|
removeAndWaitForReplicaGone(COLL_NAME, client, replica1, shard1.getName());
|
||||||
client.shutdown();
|
client.shutdown();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue