Skip to content

Apache Lucene open-source search software

SOLR-7569 test failure fix

Noble Paulb5ed21b258dc
diff --git a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
index e2c8ee2e1a4..3a23c7201dc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
*/
import java.io.IOException;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -381,8 +382,8 @@ public class ForceLeaderTest extends HttpPartitionTest {
for (int j = 0; j < notLeaders.size(); j++)
lirStates[j] = zkController.getLeaderInitiatedRecoveryState(collectionName, shard, notLeaders.get(j).getName());
for (State lirState : lirStates)
- assertEquals("Expected that the LIR state would've been down by now",
- Replica.State.DOWN, (lirState));
+ assertTrue("Expected that the replicas would be in LIR state by now. LIR states: "+Arrays.toString(lirStates),
+ Replica.State.DOWN == lirState || Replica.State.RECOVERING == lirState);
}
protected void bringBackOldLeaderAndSendDoc(String collection, Replica leader, List<Replica> notLeaders, int docid) throws Exception {