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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: WebDriver-session was overriden #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dnlkng
Copy link

@dnlkng dnlkng commented Mar 28, 2017

The previous version seemed not to be thread-safe since a NoSuchSessionException sometimes occurred when running tests in parallel in a Selenium Grid. This seems to be caused by an override of the driver property of the device from another thread, causing two tests to use the same WebDriver-session which in turn leads to an Exception when the first test to finish closes the driver-session. By only accessing the driver through the TestSession (where it is set anyway, see also https://github.com/galenframework/galen-bootstrap/blob/master/galen-bootstrap/galen-bootstrap.js#L94), we can avoid using a non-thread-local driver instance.

The previous version seemed not to be thread-safe since a NoSuchSessionException sometimes occurred when running tests in parallel in a Selenium Grid. This seems to be caused by an override of the driver property of the device from another thread, causing two tests to use the same WebDriver-session which in turn leads to an Exception when the first test to finish closes the driver-session. By only accessing the driver through the TestSession (where it is set anyway, see also https://github.com/galenframework/galen-bootstrap/blob/master/galen-bootstrap/galen-bootstrap.js#L94), we can avoid using a non-thread-local driver instance.
@dnlkng
Copy link
Author

dnlkng commented Feb 3, 2022

Are there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant