You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2022/03/07 12:35:53 UTC
[solr] branch main updated: SOLR-11094: avoid NumberFormatException in AbstractFullDistribZkTestBase.waitForReplicationFromReplicas (#620)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 527c1d1 SOLR-11094: avoid NumberFormatException in AbstractFullDistribZkTestBase.waitForReplicationFromReplicas (#620)
527c1d1 is described below
commit 527c1d1a5126a591b6dab465c887aa026debac74
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Mon Mar 7 12:35:02 2022 +0000
SOLR-11094: avoid NumberFormatException in AbstractFullDistribZkTestBase.waitForReplicationFromReplicas (#620)
---
.../solr/cloud/AbstractFullDistribZkTestBase.java | 25 +++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index f39cfc0..cc3ca38 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -2676,7 +2676,8 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
.getIndexCommit()
.getUserData()
.get(SolrIndexWriter.COMMIT_TIME_MSEC_KEY);
- if (Long.parseLong(servingVersion) == replicaIndexVersion) {
+ if (servingVersion != null
+ && Long.parseLong(servingVersion) == replicaIndexVersion) {
break;
} else {
if (log.isInfoEnabled()) {
@@ -2692,17 +2693,6 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
}
}
} else {
- if (timeout.hasTimedOut()) {
- logReplicaTypesReplicationInfo(collectionName, zkStateReader);
- fail(
- String.format(
- Locale.ROOT,
- "Timed out waiting for replica %s (%d) to replicate from leader %s (%d)",
- pullReplica.getName(),
- replicaIndexVersion,
- leader.getName(),
- leaderIndexVersion));
- }
if (leaderIndexVersion > replicaIndexVersion) {
if (log.isInfoEnabled()) {
log.info(
@@ -2722,6 +2712,17 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
}
}
}
+ if (timeout.hasTimedOut()) {
+ logReplicaTypesReplicationInfo(collectionName, zkStateReader);
+ fail(
+ String.format(
+ Locale.ROOT,
+ "Timed out waiting for replica %s (%d) to replicate from leader %s (%d)",
+ pullReplica.getName(),
+ replicaIndexVersion,
+ leader.getName(),
+ leaderIndexVersion));
+ }
Thread.sleep(1000);
}
}