You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/07/08 10:24:01 UTC

[GitHub] [solr] cpoerschke commented on a diff in pull request #927: SOLR-16278: remove unused declarations

cpoerschke commented on code in PR #927:
URL: https://github.com/apache/solr/pull/927#discussion_r916660164


##########
solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java:
##########
@@ -38,7 +36,6 @@ public class TestDistribDocBasedVersion extends AbstractFullDistribZkTestBase {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   String bucket1 = "shard1"; // shard1: top bits:10  80000000:ffffffff

Review Comment:
   ```suggestion
     String bucket1 = "shard1"; // shard1: top bits:10  80000000:ffffffff
     // String bucket2 = "shard2"; // shard2: top bits:00  00000000:7fffffff
   ```



##########
solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java:
##########
@@ -276,7 +276,6 @@ public void testPlacementMultiCriteria() throws Exception {
     final int AZ2_TLOGPULL = 7;
 
     final int AZ3_NRT_LOWCORES = 4;

Review Comment:
   ```suggestion
       final int AZ3_NRT_LOWCORES = 4;
       // final int AZ3_NRT_HIGHCORES = 6;
   ```



##########
solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java:
##########
@@ -980,7 +978,6 @@ public void testNodeType() throws Exception {
     assertEquals("expected 3 placements: " + pp, 3, pp.getReplicaPlacements().size());
     Set<String> type0nodes = nodeNamesByType.get("type_0");
     Set<String> type1nodes = nodeNamesByType.get("type_1");

Review Comment:
   ```suggestion
       Set<String> type1nodes = nodeNamesByType.get("type_1");
       // Set<String> type2nodes = nodeNamesByType.get("type_2");
   ```



##########
solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java:
##########
@@ -330,9 +330,8 @@ protected void assertDocsExistInAllReplicas(
         if (deletedDocs != null && deletedDocs.contains(d)) continue;
 
         String docId = String.valueOf(d);
-        Long leaderVers = assertDocExists(leaderSolr, testCollectionName, docId, null);
-        for (HttpSolrClient replicaSolr : replicas)
-          assertDocExists(replicaSolr, testCollectionName, docId, leaderVers);
+        Long leaderVers = assertDocExists(leaderSolr, docId, null);
+        for (HttpSolrClient replicaSolr : replicas) assertDocExists(replicaSolr, docId, leaderVers);

Review Comment:
   ```suggestion
           for (HttpSolrClient replicaSolr : replicas) {
             assertDocExists(replicaSolr, docId, leaderVers);
           }
   ```



##########
solr/core/src/test/org/apache/solr/internal/csv/CSVParserTest.java:
##########
@@ -377,37 +377,6 @@ public void testEmptyLineBehaviourCSV() throws Exception {
     }
   }
 
-  public void OLDtestBackslashEscaping() throws IOException {

Review Comment:
   How about keeping this and renaming to `testOLDBackslashEscaping()` say?



##########
solr/core/src/test/org/apache/solr/core/ConfigureRecoveryStrategyTest.java:
##########
@@ -82,14 +82,6 @@ public static class CustomRecoveryStrategy extends RecoveryStrategy {
 
     private String alternativeBaseUrlProp;
 
-    public String getAlternativeBaseUrlProp() {
-      return alternativeBaseUrlProp;
-    }
-
-    public void setAlternativeBaseUrlProp(String alternativeBaseUrlProp) {
-      this.alternativeBaseUrlProp = alternativeBaseUrlProp;
-    }
-

Review Comment:
   This is used via reflection: https://github.com/apache/solr/blob/releases/solr/9.0.0/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L91



##########
solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java:
##########
@@ -1394,8 +1394,7 @@ private static void addRandomFlValidators(final Random r, final Set<FlValidator>
    * Given an ordered list of values to include in a (key) param, randomly groups them (ie: comma

Review Comment:
   ```suggestion
      * Given an ordered list of values to include in a (key) param, groups them (ie: comma
   ```



##########
solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java:
##########
@@ -101,8 +101,6 @@ private static void copyFile(File src, File dst, Integer port, boolean internalC
 
   public static void assertVersions(SolrClient client1, SolrClient client2) throws Exception {
     NamedList<Object> details = getDetails(client1);

Review Comment:
   ```suggestion
   ```



##########
solr/core/src/test/org/apache/solr/handler/ThrowErrorOnInitRequestHandler.java:
##########
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.handler;
-
-import java.io.IOException;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.security.AuthorizationContext;
-
-/** throws a {@link java.lang.Error} on init for testing purposes */
-public class ThrowErrorOnInitRequestHandler extends RequestHandlerBase {

Review Comment:
   Looks to be used in tests: https://github.com/apache/solr/search?q=ThrowErrorOnInitRequestHandler



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org