SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL#4247
SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL#4247dsmiley wants to merge 1 commit intoapache:mainfrom
Conversation
…r test infra ensures Jetty client is configured when SSL is.
There was a problem hiding this comment.
I have nothing against the JDK HttpClient, but Solr has a major investment in Jetty HttpClient. Like setting up randomized SSL and having it just work. I hate that the mechanism works via a kind of secret static variable backdoor (my characterization of it) that STCJ4 uses but it is what it is.
I did see how we could get an HttpClient configured with SSL to be able to work. I shelved the details if we need to bring it forth -- and we might perhaps for new/better HttpJdkSolrClient tests; who knows. But in the end it felt like it's more trouble than it's worth bothering with. We might consider putting the JDK HttpClient builder in forbidden APIs to guard against accidental use for those not knowing (by people / LLMs).
Maybe I should write all this up into a JIRA to do that.
| response.body(), | ||
| containsString("FAILURE")); | ||
| } | ||
| ContentResponse response = |
There was a problem hiding this comment.
Instead of creating a client, this PR uses the very new (like hours ago) JettySolrRunner.getSolrClient to return a HttpJettySolrClient. That in turn has getHttpClient -- Jetty based (not JDK) -- obviously.
|
BTW org.apache.solr.crossdc.manager.SolrAndKafkaIntegrationTest#testStrictOrdering has been so friggin flaky that I Ignored it. Already pointed this out a week ago in JIRA but no action yet. |
|
This was the seed that reproducibly failed: |
|
Some of the test failures here can be seen in CI: https://ci-builds.apache.org/job/Solr/job/Solr-Test-main/13698/ |
Fix test by using the Jetty HttpClient not JDK HttpClient. Our test infra ensures Jetty client is configured when SSL is on (see STCJ4).
I don't think our tests should use JDK HttpClient, unless there's good reason to use that one specifically. I'd rather we simply standardize on the Jetty one, which we use way more.