Closed Bug 1321775 Opened 8 years ago Closed 8 years ago

Better checks for client property of Marionette class

Categories

(Testing :: Marionette Client and Harness, defect)

defect
Not set
normal

Tracking

(firefox52 fixed, firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

Details

(Keywords: pi-marionette-client)

Attachments

(1 file)

If the initial port check for Marionette in __init__ fails, @do_process_check is run and triggers a delete_session(). At this time there is no self.client defined and we fail in delete_session() with:

> AttributeError: 'Marionette' object has no attribute 'client'
Comment on attachment 8816418 [details]
Bug 1321775 - Better handling for client property in Marionette class.

https://reviewboard.mozilla.org/r/97170/#review97490

::: testing/marionette/client/marionette_driver/marionette.py:1313
(Diff revision 1)
>              self.session = None
>              self.process_id = None
>              self.profile = None
>              self.window = None
> +
> +            if self.client:

`if self.client is not None`
Attachment #8816418 - Flags: review?(ato) → review+
Comment on attachment 8816418 [details]
Bug 1321775 - Better handling for client property in Marionette class.

https://reviewboard.mozilla.org/r/97170/#review97542

::: testing/marionette/client/marionette_driver/marionette.py:1313
(Diff revision 1)
>              self.session = None
>              self.process_id = None
>              self.profile = None
>              self.window = None
> +
> +            if self.client:

The client is an instance of a class and not an atomic type. So you wouldn't need that explicite check for None, because it can only be a valid instance or None.

But I will do the change to be conform with other code.
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23eb207c40d8
Better handling for client property in Marionette class. r=ato
https://hg.mozilla.org/mozilla-central/rev/23eb207c40d8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Test-only change to improve the stability of Marionette. We would like to have it in the 52ESR. Please uplift to aurora. Thanks.
Whiteboard: [checkin-needed-aurora]
Product: Testing → Remote Protocol

Moving bugs for Marionette client due to component changes.

Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
Version: Version 3 → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: