[grid] enable the httpclient to perform async requests #14403#14409
[grid] enable the httpclient to perform async requests #14403#14409
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit f83ad29)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: where Configuration options
See more information about the |
|
I just stumbled into another usecase for this, the e.g. a open Socket is Before the client timeout: And while looking into this another usecase inside the |
|
Okay, there is no need to keep the session alive, the read timeout of the node is identical to the session timeout. |
f671366 to
8326c3e
Compare
VietND96
left a comment
There was a problem hiding this comment.
LGTM!
CI passed, so I would like to merge and include this in release 4.26.0
User description
Description
This change will allow enable the httpclient to perform async requests.
Motivation and Context
see #14403
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
HttpClientinterface usingCompletableFuture.executeAsyncmethod inJdkHttpClientwith proper timeout handling and error management.execute0with synchronous execution to avoid known JDK issues.Changes walkthrough 📝
HttpClient.java
Add asynchronous HTTP request capability to HttpClientjava/src/org/openqa/selenium/remote/http/HttpClient.java
executeAsyncmethod to perform asynchronous HTTP requests.CompletableFuturefor async operations.JdkHttpClient.java
Implement async execution and improve error handling in JdkHttpClientjava/src/org/openqa/selenium/remote/http/jdk/JdkHttpClient.java
executeAsyncmethod with timeout handling.sendAsyncwith synchronoussendinexecute0.HttpClientTestBase.java
Add test for request timeout handling in HttpClientjava/test/org/openqa/selenium/remote/internal/HttpClientTestBase.java
AtomicIntegerto track request attempts.