Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: JdkHttpClient does prevent process to terminate promptly #13601

Closed
joerg1985 opened this issue Feb 19, 2024 · 2 comments
Closed

Comments

@joerg1985
Copy link
Member

What happened?

When the JdkHttpClient is e.g. used in a main method it will prevent the process to terminate for 60s.

The threads created by JdkHttpClient.executorService should be daemon threads to avoid this.

How can we reproduce the issue?

import java.net.URI;
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.HttpMethod;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.jdk.JdkHttpClient;

public class KeepsRunning {
    public static void main(String[] args) {
        var c = new JdkHttpClient.Factory().createClient(ClientConfig.defaultConfig()
                .baseUri(URI.create("http://127.0.0.1:4444")));
        
        c.execute(new HttpRequest(HttpMethod.GET, "http://127.0.0.1:4444"));
    }
}

Relevant log output

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time:  01:02 min
Finished at: 2024-02-19T12:39:34+01:00
------------------------------------------------------------------------

Operating System

win 10 x64

Selenium version

4.17.0

What are the browser(s) and version(s) where you see this issue?

N/A

What are the browser driver(s) and version(s) where you see this issue?

N/A

Are you using Selenium Grid?

no

Copy link

@joerg1985, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@joerg1985 joerg1985 changed the title [馃悰 Bug]: JdkHttpClient does prevent process to terminate [馃悰 Bug]: JdkHttpClient does prevent process to terminate promptly Feb 19, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant