This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new f4c2088b68c SOLR-18024 Flaky test
CloudHttp2SolrClientTest.testHttpCspPerf (#3938)
f4c2088b68c is described below
commit f4c2088b68c492f8d7e508bef1271de784e5a9cd
Author: Jan Høydahl <[email protected]>
AuthorDate: Tue Dec 16 11:33:04 2025 +0100
SOLR-18024 Flaky test CloudHttp2SolrClientTest.testHttpCspPerf (#3938)
Co-authored-by: David Smiley <[email protected]>
(cherry picked from commit 5201ea82f9e00f92cb69465f22868bff484ee7ed)
---
.../solr/client/solrj/impl/CloudHttp2SolrClientTest.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git
a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
index 95ac8ef41a5..536f89c4962 100644
---
a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
+++
b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
@@ -109,6 +109,10 @@ public class CloudHttp2SolrClientTest extends
SolrCloudTestCase {
@BeforeClass
public static void setupCluster() throws Exception {
System.setProperty("metricsEnabled", "true");
+ // BaseHttpClusterStateProvider has a background job that pre-fetches data
from CLUSTERSTATUS
+ // on timed intervals. This can pollute this test, so we set the interval
very high to
+ // prevent it from running.
+ System.setProperty(SYS_PROP_CACHE_TIMEOUT_SECONDS, "" + Integer.MAX_VALUE);
configureCluster(NODE_COUNT)
.addConfig(
"conf",
@@ -296,14 +300,9 @@ public class CloudHttp2SolrClientTest extends
SolrCloudTestCase {
// admin endpoint. Too many calls to CLUSTERSTATUS might mean insufficient
caching and
// performance regressions!
- // BaseHttpClusterStateProvider has a background job that pre-fetches data
from CLUSTERSTATUS
- // on timed intervals. This can pollute this test, so we set the interval
very high to
- // prevent it from running.
- System.setProperty(SYS_PROP_CACHE_TIMEOUT_SECONDS, "" + Integer.MAX_VALUE);
-
String collectionName = "HTTPCSPTEST";
CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1)
- .process(cluster.getSolrClient());
+ .process(getRandomClient());
cluster.waitForActiveCollection(collectionName, 2, 2);
try (LogListener adminLogs =
LogListener.info(HttpSolrCall.class).substring("[admin]");
@@ -342,6 +341,9 @@ public class CloudHttp2SolrClientTest extends
SolrCloudTestCase {
assertEquals(2, adminLogs.getCount());
}
}
+
+ // Clean up the collection to allow test iterations to succeed
+
CollectionAdminRequest.deleteCollection(collectionName).process(getRandomClient());
}
private CloudSolrClient createHttpCSPBasedCloudSolrClient() {