This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9_8
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_8 by this push:
new deaff2d492a Fix small race condition in DeleteReplicaTest
deaff2d492a is described below
commit deaff2d492aa80cf631b7dab2f6a400f6f2d26c7
Author: Houston Putman <[email protected]>
AuthorDate: Thu Feb 20 12:50:49 2025 -0600
Fix small race condition in DeleteReplicaTest
The CoreContainer will be provided to the jetty after the jetty is
running. If the test tries to get the cores right after the server is
ready, it will cause a NullPointerException. So just wait on the cores
being ready too.
(cherry picked from commit 8160f9ffff86ab34fb92c6f8fbd1de200060a5f3)
---
solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
index 16242bcc5eb..d334eabdc6c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
@@ -505,7 +505,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
private void waitForJettyInit(JettySolrRunner replica1Jetty, String
replica1JettyNodeName)
throws InterruptedException {
TimeOut timeOut = new TimeOut(5, TimeUnit.SECONDS, TimeSource.NANO_TIME);
- while (!replica1Jetty.isRunning()) {
+ while (!replica1Jetty.isRunning() || replica1Jetty.getCoreContainer() ==
null) {
Thread.sleep(100);
if (timeOut.hasTimedOut())
fail("Wait for " + replica1JettyNodeName + " replica to init failed!");