Skip to content

Commit 335df5d

Browse files
committed
[java] give the driver some time to terminate graceful
1 parent 0209bec commit 335df5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/src/org/openqa/selenium/remote/service/DriverService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ public void stop() {
298298
try {
299299
URL killUrl = new URL(url.toString() + "/shutdown");
300300
new UrlChecker().waitUntilUnavailable(3, SECONDS, killUrl);
301+
try {
302+
process.waitFor(Duration.ofSeconds(10));
303+
} catch (InterruptedException e) {
304+
Thread.currentThread().interrupt();
305+
}
301306
} catch (MalformedURLException e) {
302307
toThrow = new WebDriverException(e);
303308
} catch (UrlChecker.TimeoutException e) {

0 commit comments

Comments
 (0)