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

Automatically setting session to None for new session tests #9889

Merged
merged 1 commit into from Mar 9, 2018

Conversation

Projects
None yet
4 participants
@jimevans
Copy link
Contributor

jimevans commented Mar 7, 2018

There is an edge case in the current implementation where a "new session"
test can create a new session and expressly close the created session by
calling end(), but the next test that is not a "new session" test sees the
"current session" object as not None, and failing to create a new
session. This change fixes that issue. If the session is not None and has
a valid session ID, the end() method still gets called. If the current
session is not None, but has an invalid session ID, it cannot be
terminated any other way, so setting the current session to None at that
point is not a negative side effect. Finally, if the current session is
already None, setting the variable to None again does no harm.

Automatically setting session to None for new session tests
There is an edge case in the current implementation where a new session
test can create a new session and expressly close the created session by
calling `end()`, but the next test that is not a new session test sees the
"current session" object as not `None`, and failing to create a new
session. This change fixes that issue. If the session is not None and has
a valid session ID, the `end()` method still gets called. If the current
session is not None, but has an invalid session ID, it cannot be
terminated any other way, so setting the current session to None at that
point is not a negative side effect. Finally, if the current session is
already None, setting the variable to None again does not hurt.
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 7, 2018

Build ERRORED

Started: 2018-03-09 19:39:24
Finished: 2018-03-09 20:41:03

This report has been truncated because the number of unstable tests exceeds GitHub.com's character limit for comments (65536 characters).

Failing Jobs

  • chrome:dev
  • firefox:nightly

Unstable Browsers

Browser: "Chrome Dev" (failures allowed)

View in: WPT PR Status | TravisCI

@jgraham jgraham merged commit 18d9e51 into web-platform-tests:master Mar 9, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details

@jimevans jimevans deleted the jimevans:session-termination branch Mar 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.