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
What happened?
When the
JdkHttpClientis e.g. used in a main method it will prevent the process to terminate for 60s.The threads created by
JdkHttpClient.executorServiceshould be daemon threads to avoid this.How can we reproduce the issue?
Relevant log output
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