I am running parallel test (one test per thread) with Selenium + Chromeriver. Each thread creates a new chrome driver instance (driver = new ChromeDriver(options);) and close it when the test ends using driver.quit(). Once in a while I see the following exception getting thrown. This exception is thrown after chrome driver starts up and half way through the test. Can one thread calling driver.quit() close the instance of other? What could be causing this? Has any one dealt with this before?
ChromeDriver version is v85.0.4183.87.
org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:12406\nBuild info: version: 'unknown', revision: 'unknown', time: 'unknown'\nSystem info: host: '6d3453df-688f-4be0-a709-7b7b08b464a0', ip: '172.17.128.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1074-aws', java.version: '11.0.8'\nDriver info: driver.version: RemoteWebDriver\n\tat org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)