You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2026/03/29 15:29:49 UTC
[PR] Fix test for SSL by using the Jetty HttpClient not JDK HttpClient. O… [solr]
dsmiley opened a new pull request, #4247:
URL: https://github.com/apache/solr/pull/4247
…ur test infra ensures Jetty client is configured when SSL is.
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4169586044
Looks great. Would it make sense to apply this pattern to any other tests using the jdk client?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Fix test for SSL by using the Jetty HttpClient not JDK HttpClient. O… [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4150975962
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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Fix test for SSL by using the Jetty HttpClient not JDK HttpClient. O… [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #4247:
URL: https://github.com/apache/solr/pull/4247#discussion_r3006686048
##########
solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java:
##########
@@ -172,20 +169,17 @@ public void testV1FailureResponseIncludesStatusField() throws Exception {
// Use a raw HTTP request so we can inspect the full response body.
// SolrJ's HealthCheckRequest throws RemoteSolrException on non-200 responses and does
// not expose the response body, so we go below SolrJ here.
- try (HttpClient httpClient = HttpClient.newHttpClient()) {
- HttpResponse<String> response =
- httpClient.send(
- HttpRequest.newBuilder()
- .uri(URI.create(newJetty.getBaseUrl() + HEALTH_CHECK_HANDLER_PATH))
- .build(),
- HttpResponse.BodyHandlers.ofString());
-
- assertEquals("Expected 503 SERVICE_UNAVAILABLE", 503, response.statusCode());
- assertThat(
- "v1 error response body must contain status=FAILURE so body-inspecting clients get a clear signal",
- response.body(),
- containsString("FAILURE"));
- }
+ ContentResponse response =
Review 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4170053592
Auditing getHttpClient callers (for possibly switching to the pattern seen in this PR) wold help us get off of Apache HttpClient. You don't even need to think hard if it's truly Jetty vs Apache vs JDK: if the client isn't obviously a Jetty one, and if you see the client being fetched in a way *other* than how this PR does it, then change to this pattern. If it seems hard for some cases then pass on them.
If you start on this LMK; otherwise I'll sick an LLM on it sometime by weekend as I think this is a great incremental step.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley merged PR #4247:
URL: https://github.com/apache/solr/pull/4247
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4151841976
Some of the test failures here can be seen in CI: https://ci-builds.apache.org/job/Solr/job/Solr-Test-main/13698/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4165825662
any concerns here @epugh ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Fix test for SSL by using the Jetty HttpClient not JDK HttpClient. O… [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4151829706
This was the seed that reproducibly failed:
```
./gradlew :solr:core:test --tests "org.apache.solr.handler.admin.HealthCheckHandlerTest.testV1FailureResponseIncludesStatusField" -Ptests.seed=58F0C58B3D8F9C1D
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4170243454
> Auditing getHttpClient callers (for possibly switching to the pattern seen in this PR) wold help us get off of Apache HttpClient. You don't even need to think hard if it's truly Jetty vs Apache vs JDK: if the client isn't obviously a Jetty one, and if you see the client being fetched in a way _other_ than how this PR does it, then change to this pattern. If it seems hard for some cases then pass on them.
>
> If you start on this LMK; otherwise I'll sick an LLM on it sometime by weekend as I think this is a great incremental step.
I think I am going to try and not get distracted by doing this, and keep plugging away on V2 apis ;-). I will happilly review your PR however!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16458: Fix flaky test HealthCheckHandlerTest due to SSL [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4247:
URL: https://github.com/apache/solr/pull/4247#issuecomment-4169824413
Yeah, especially Apache HttpClient! Just search for getHttpClient
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org