test_window_switching.py causes Marionette to abort when running locally (Could not delete session | TypeError: this.browser.removeTab is not a function)

RESOLVED FIXED in mozilla34

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: standard8, Assigned: automatedtester)

Tracking

({pi-marionette-server})

unspecified
mozilla34
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

When running the full marionette suite locally, the suite aborts when it gets to test_window_switching.py, it also aborts if I just run the test by itself:

$ ./mach marionette-test testing/marionette/client/marionette/tests/unit/test_window_switching.py
starting httpd
running webserver on http://127.0.0.1:52916/
TEST-START test_window_switching.py
testJSWindowCreationAndSwitching (test_window_switching.TestWindowSwitching) ... Error running mach:

    ['marionette-test', 'testing/marionette/client/marionette/tests/unit/test_window_switching.py']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

MarionetteException: MarionetteException: Could not delete session
stacktrace:
	TypeError: this.browser.removeTab is not a function



  File "/Users/mark/loop/gecko-dev-master/testing/marionette/mach_commands.py", line 108, in run_marionette_test
    topsrcdir=self.topsrcdir, address=address)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/mach_commands.py", line 56, in run_marionette
    runner = startTestRunner(MarionetteTestRunner, options, tests)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runtests.py", line 19, in startTestRunner
    runner.run_tests(tests)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runner/base.py", line 821, in run_tests
    self.run_test_sets()
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runner/base.py", line 1040, in run_test_sets
    self.run_test_set(in_process_tests)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runner/base.py", line 1017, in run_test_set
    self.run_test(test['filepath'], test['expected'], test['oop'])
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runner/base.py", line 994, in run_test
    results = runner.run(suite)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/runner/base.py", line 292, in run
    test(result)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 396, in __call__
    return self.run(*args, **kwds)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette_test.py", line 207, in run
    self.cleanTest()
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette_test.py", line 286, in cleanTest
    self._deleteSession()
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette_test.py", line 298, in _deleteSession
    self.marionette.delete_session()
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette.py", line 765, in delete_session
    response = self._send_message('deleteSession', 'ok')
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/decorators.py", line 35, in _
    return func(*args, **kwargs)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette.py", line 633, in _send_message
    self._handle_error(response)
  File "/Users/mark/loop/gecko-dev-master/testing/marionette/client/marionette/marionette.py", line 704, in _handle_error
    raise MarionetteException(message=message, status=status, stacktrace=stacktrace)

I'm running on a 10.8 Mac, with --enable-debug, and --enable optimize.
This looks like a timing problem; we're trying to use gBrowser before it's ready.
Blocks: 1050511
Assignee: nobody → dburns
Status: NEW → ASSIGNED
Comment on attachment 8470028 [details] [diff] [review]
Check we can remove a tab before trying to remove it in Marionette

Review of attachment 8470028 [details] [diff] [review]:
-----------------------------------------------------------------

tested locally and it works, thanks!
Attachment #8470028 - Flags: review?(mdas) → review+
Attachment #8470028 - Attachment is obsolete: true
Attachment #8470223 - Flags: review?(mdas) → review+
https://hg.mozilla.org/mozilla-central/rev/d93cdea2d530
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.