You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2022/10/12 07:32:26 UTC
[solr] branch jira/solr-16640 updated: this test is duplicated in PerReplicaStatesIntegrationTest
This is an automated email from the ASF dual-hosted git repository.
noble pushed a commit to branch jira/solr-16640
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/jira/solr-16640 by this push:
new beac790bee5 this test is duplicated in PerReplicaStatesIntegrationTest
beac790bee5 is described below
commit beac790bee554ee6fe96839b55c9dbce0736bc54
Author: Noble Paul <no...@gmail.com>
AuthorDate: Wed Oct 12 18:32:17 2022 +1100
this test is duplicated in PerReplicaStatesIntegrationTest
---
.../client/solrj/impl/CloudSolrClientTest.java | 41 ----------------------
1 file changed, 41 deletions(-)
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index e358ef94ad1..f9e24f30ade 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -1164,45 +1164,4 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
assertEquals("This should be OK", 0, response.getStatus());
}
-
- public void testPerReplicaStateCollection() throws Exception {
- String collection = getSaferTestName();
-
- CollectionAdminRequest.createCollection(collection, "conf", 2, 1)
- .process(cluster.getSolrClient());
-
- String testCollection = "perReplicaState_test";
- String collectionPath = DocCollection.getCollectionPath(testCollection);
-
- int liveNodes = cluster.getJettySolrRunners().size();
- CollectionAdminRequest.createCollection(testCollection, "conf", 2, 2)
- .setPerReplicaState(Boolean.TRUE)
- .process(cluster.getSolrClient());
- cluster.waitForActiveCollection(testCollection, 2, 4);
- final SolrClient clientUnderTest = getRandomClient();
- final SolrPingResponse response = clientUnderTest.ping(testCollection);
- assertEquals("This should be OK", 0, response.getStatus());
-
- DocCollection c = cluster.getZkStateReader().getCollection(testCollection);
- c.forEachReplica((s, replica) -> assertNotNull(replica.getReplicaState()));
- PerReplicaStates prs =
- PerReplicaStatesFetcher.fetch(collectionPath, cluster.getZkClient(), null);
- assertEquals(4, prs.states.size());
-
- JettySolrRunner jsr = null;
- try {
- jsr = cluster.startJettySolrRunner();
-
- // Now let's do an add replica
- CollectionAdminRequest.addReplicaToShard(testCollection, "shard1")
- .process(cluster.getSolrClient());
- prs = PerReplicaStatesFetcher.fetch(collectionPath, cluster.getZkClient(), null);
- assertEquals(5, prs.states.size());
-
- } finally {
- if (jsr != null) {
- cluster.stopJettySolrRunner(jsr);
- }
- }
- }
}