This is an automated email from the ASF dual-hosted git repository.
houston 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 37f8dac965e Fix flaky
PlacementPluginIntegrationTest.testDynamicReconfiguration test
37f8dac965e is described below
commit 37f8dac965e26dff69c57f4eaf653fdd72355251
Author: Houston Putman <[email protected]>
AuthorDate: Wed Mar 12 15:12:30 2025 -0500
Fix flaky PlacementPluginIntegrationTest.testDynamicReconfiguration test
(cherry picked from commit cb6e9935fd122232ca80f0caa34d7751e014e7a7)
---
.../placement/impl/PlacementPluginIntegrationTest.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git
a/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
b/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
index 6c1aec5271e..38f6e0ae8e2 100644
---
a/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
+++
b/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
@@ -57,6 +57,7 @@ import
org.apache.solr.cluster.placement.plugins.RandomPlacementFactory;
import org.apache.solr.cluster.placement.plugins.SimplePlacementFactory;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.DocCollection;
+import org.apache.solr.common.util.RetryUtil;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.util.LogLevel;
import org.junit.After;
@@ -101,6 +102,18 @@ public class PlacementPluginIntegrationTest extends
SolrCloudTestCase {
.withPayload("{remove: '" + PlacementPluginFactory.PLUGIN_NAME +
"'}")
.build();
req.process(cluster.getSolrClient());
+ // Wait until we see this locally, this is important for tests to make
sure they don't start
+ // without a clean coreContainer
+ RetryUtil.retryUntil(
+ "PlacementPluginFactory not removed in coreContainer within 1 second
after removal API call",
+ 1000,
+ 1,
+ TimeUnit.MILLISECONDS,
+ () -> {
+ DelegatingPlacementPluginFactory pluginFactory =
+ (DelegatingPlacementPluginFactory)
cc.getPlacementPluginFactory();
+ return pluginFactory.getDelegate() == null;
+ });
}
}