Skip to content

Commit fbcfb11

Browse files
Force terminate chromedriver process when interrupting the test run
1 parent b7c6c5a commit fbcfb11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/CartonCLI/Commands/TestRunners/BrowserTestRunner.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ struct BrowserTestRunner: TestRunner {
8989
arguments: ["--port=\(address.port!)"]
9090
)
9191
terminal.logLookup("Launch WebDriver executable: ", executablePath)
92-
let disposer = { process.interrupt() }
92+
let disposer = {
93+
// Seems like chromedriver doesn't respond to SIGTERM and SIGINT
94+
kill(process.processIdentifier, SIGKILL)
95+
process.waitUntilExit()
96+
}
9397
return (URL(string: "http://\(address.ipAddress!):\(address.port!)")!, disposer)
9498
}
9599

0 commit comments

Comments
 (0)