Closed Bug 893026 Opened 7 years ago Closed 7 years ago

Python framework wrongly assumes to restart the application while it has already been done by the extension

Categories

(Testing Graveyard :: Mozmill, defect, critical)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [mozmill-2.0+][ateamtrack: p=mozmill q=2013q3 m=1])

Attachments

(1 file)

This is a very serious issue, which I have found during the investigation of a problem Andrei pointed me to on bug 886811.

So when we restart the application via the extension by calling restartApplication() we send a shutdownMode object to the Python side, and directly restart the application. This object is checked in a broken manner and will be falsely evaluated. As result the Python framework will also start the application, while it has been already done by itself. So two instances are trying to access the same profile now, which results in a warning like "A copy of Firefox is already running". We know that very well and have seen this a lot with a following Application disconnect error.

I already have a patch with a couple of improvements. I will give details with the review request.
Attached patch Patch v1Splinter Review
Here is the patch and the following improvements:

* Don't let the Python framework start the application itself for restartApplication() calls. This will prevent the known Application disconnect failures.

* The resetProfile option has been removed from restartApplication, because it should simply not be allowed during a single test. No-one would switch a profile in such a state.

* The correct flags for startup.quit() are now directly set in restartApplication and stopApplication, so we correctly transfer those with the userShutdown object.

* No need to query for the nsIAppStartup service. We can directly make use of Services.startup.quit().
Attachment #774725 - Flags: review?(ctalbert)
Attachment #774725 - Flags: feedback?(dave.hunt)
Attachment #774725 - Flags: feedback?(andrei.eftimie)
Comment on attachment 774725 [details] [diff] [review]
Patch v1

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

Looks good. r+
Attachment #774725 - Flags: review?(ctalbert) → review+
Landed on master:
https://github.com/mozilla/mozmill/commit/ca55d2eea200658800f8c94f7dd30577dde365ca
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-2.0+] → [mozmill-2.0+][ateamtrack: p=mozmill q=2013q2 m=4]
Flags: in-testsuite+
Whiteboard: [mozmill-2.0+][ateamtrack: p=mozmill q=2013q2 m=4] → [mozmill-2.0+][ateamtrack: p=mozmill q=2013q3 m=1]
Attachment #774725 - Flags: feedback?(dave.hunt)
Attachment #774725 - Flags: feedback?(andrei.eftimie)
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.