mirror of https://github.com/apache/lucene.git
SOLR-8414: AbstractDistribZkTestBase.verifyReplicaStatus could throw NPE
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1719981 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1d6b78efdb
commit
f81f939b54
|
@ -312,6 +312,8 @@ Other Changes
|
|||
|
||||
* SOLR-8352: randomise unload order in UnloadDistributedZkTest.testUnloadShardAndCollection (Christine Poerschke)
|
||||
|
||||
* SOLR-8414: AbstractDistribZkTestBase.verifyReplicaStatus could throw NPE (Christine Poerschke)
|
||||
|
||||
================== 5.4.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
|
||||
|
|
|
@ -224,11 +224,14 @@ public abstract class AbstractDistribZkTestBase extends BaseDistributedSearchTes
|
|||
while(maxIterations-->0) {
|
||||
Slice slice = reader.getClusterState().getSlice(collection, shard);
|
||||
if(slice!=null) {
|
||||
coreState = slice.getReplicasMap().get(coreNodeName).getState();
|
||||
Replica replica = slice.getReplicasMap().get(coreNodeName);
|
||||
if (replica != null) {
|
||||
coreState = replica.getState();
|
||||
if(coreState == expectedState) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
Thread.sleep(50);
|
||||
}
|
||||
fail("Illegal state, was: " + coreState + " expected:" + expectedState + " clusterState:" + reader.getClusterState());
|
||||
|
|
Loading…
Reference in New Issue