This is an automated email from the ASF dual-hosted git repository.

psalagnac pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 3745145d3d1 Fix rarely flaky DeleteInactiveReplicaTest. (#3012)
3745145d3d1 is described below

commit 3745145d3d1cea43430daf9a4bd73ee24376e39b
Author: Pierre Salagnac <psalag...@apache.org>
AuthorDate: Thu Jan 9 22:47:30 2025 +0100

    Fix rarely flaky DeleteInactiveReplicaTest. (#3012)
    
    The test was retrieving a replica from cluster state using core name
    instead of correct replica name.
---
 .../src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java 
b/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
index 8d3749b7eba..33bab69aeae 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
@@ -83,7 +83,7 @@ public class DeleteInactiveReplicaTest extends 
SolrCloudTestCase {
         "Expected replica " + replica.getName() + " on down node to be removed 
from cluster state",
         collectionName,
         (n, c) -> {
-          Replica r = c.getReplica(replica.getCoreName());
+          Replica r = c.getReplica(replica.getName());
           return r == null || r.getState() != Replica.State.ACTIVE;
         });
 
@@ -96,7 +96,7 @@ public class DeleteInactiveReplicaTest extends 
SolrCloudTestCase {
         "Expected deleted replica " + replica.getName() + " to be removed from 
cluster state",
         collectionName,
         (n, c) -> {
-          return c.getReplica(replica.getCoreName()) == null;
+          return c.getReplica(replica.getName()) == null;
         });
 
     cluster.startJettySolrRunner(jetty);

Reply via email to