You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/26 21:49:42 UTC
[lucene-solr] branch reference_impl updated: @363 Tweak test.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl by this push:
new 2b8048c @363 Tweak test.
2b8048c is described below
commit 2b8048c15f27236cf74eaf30dc2182a5a6be6e5b
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sun Jul 26 16:49:27 2020 -0500
@363 Tweak test.
---
.../test/org/apache/solr/cloud/DeleteNodeTest.java | 28 +++-------------------
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
index 5c5cca5..6af8018 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
@@ -45,7 +45,7 @@ public class DeleteNodeTest extends SolrCloudTestCase {
@BeforeClass
public static void setupCluster() throws Exception {
useFactory(null);
- configureCluster(6)
+ configureCluster(TEST_NIGHTLY ? 6 : 3)
.addConfig("conf1", TEST_PATH().resolve("configsets").resolve("cloud-dynamic").resolve("conf"))
.formatZk(true).configure();
}
@@ -70,34 +70,12 @@ public class DeleteNodeTest extends SolrCloudTestCase {
CollectionAdminRequest.createCollection(coll, "conf1", 5, 1, 0, 0),
CollectionAdminRequest.createCollection(coll, "conf1", 5, 0, 1, 0)
);
- create.setCreateNodeSet(StrUtils.join(l, ',')).setMaxShardsPerNode(10);
+ create = create.setCreateNodeSet(StrUtils.join(l, ',')).setMaxShardsPerNode(20);
cloudClient.request(create);
state = cloudClient.getZkStateReader().getClusterState();
String node2bdecommissioned = l.get(0);
// check what replicas are on the node, and whether the call should fail
- boolean shouldFail = false;
- DocCollection docColl = state.getCollection(coll);
- log.info("#### DocCollection: {}", docColl);
- List<Replica> replicas = docColl.getReplicas(node2bdecommissioned);
- if (replicas != null) {
- for (Replica replica : replicas) {
- String shard = docColl.getShardId(node2bdecommissioned, replica.getStr(ZkStateReader.CORE_NAME_PROP));
- Slice slice = docColl.getSlice(shard);
- boolean hasOtherNonPullReplicas = false;
- for (Replica r: slice.getReplicas()) {
- if (!r.getName().equals(replica.getName()) &&
- !r.getNodeName().equals(node2bdecommissioned) &&
- r.getType() != Replica.Type.PULL) {
- hasOtherNonPullReplicas = true;
- break;
- }
- }
- if (!hasOtherNonPullReplicas) {
- shouldFail = true;
- break;
- }
- }
- }
+
//new CollectionAdminRequest.DeleteNode(node2bdecommissioned).processAsync("003", cloudClient);
new CollectionAdminRequest.DeleteNode(node2bdecommissioned).process(cloudClient);
// CollectionAdminRequest.RequestStatus requestStatus = CollectionAdminRequest.requestStatus("003");