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

Support the sessionOverride flag #6445

Merged
merged 1 commit into from Apr 29, 2016
Merged

Support the sessionOverride flag #6445

merged 1 commit into from Apr 29, 2016

Conversation

imurchie
Copy link
Contributor

Proposed changes

We still have the --session-override server argument, but it does nothing. Until we support multiple sessions, this should kill any existing sessions.

See #6442

Types of changes

What types of changes does your code introduce to Appium?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Reviewers: @scottdixon, @jlipps

@scottdixon-zz
Copy link

👍

@jlipps
Copy link
Member

jlipps commented Apr 28, 2016

LGTM. would love to see at least a unit test though

@norekinc
Copy link

Hi,

I just tested this commit, to check whether session is really killed. With running node . --session-override --log-level info and I found out that, it gets stuck, after this block of code is invoked. So every next (3rd+) test run - server responses with 500 and server logs are:

[Appium] Session override is on. Deleting other sessions.
[Appium] Deleting session '9ad5cefc-df02-4897-810d-6860b1a11f3d'
[AndroidDriver] Cannot shut down Android driver; it has already shut down
[HTTP] <-- POST /wd/hub/session 500 58 ms - 193

The only way out is to kill server and start again

@imurchie
Copy link
Contributor Author

Ok. I'll look into catching the error.

@imurchie
Copy link
Contributor Author

imurchie commented Apr 29, 2016

Added a test, and catch any error coming from the deleting of a session.

@norekinc Do you mind trying again? Thanks!

@norekinc
Copy link

Looks great now 👍

@imurchie imurchie merged commit 1672203 into master Apr 29, 2016
@imurchie imurchie deleted the isaac-so branch April 29, 2016 11:34
@@ -71,6 +71,41 @@ describe('AppiumDriver', () => {
await appium.createSession(BASE_CAPS);
mockFakeDriver.verify();
});
it.only('should kill all other sessions if sessionOverride is on', async () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoot!

@jlipps
Copy link
Member

jlipps commented Apr 29, 2016

👍 (except for .only :-))

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.

None yet

4 participants