Closed Bug 1428740 Opened 6 years ago Closed 6 years ago

Improve Marionette unit tests for crashes

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Due to bug and deps we had to stop all crash tests from running. I'm working towards re-enabling them. As such I want to see some improvements to the tests first given that I can reproduce the underlying hang during shutdown of Firefox now.
Comment on attachment 8940672 [details]
Bug 1428740 - Improve Marionette unit tests for parent and content crashes.

https://reviewboard.mozilla.org/r/210920/#review217198

Just a question to understand the motivation behind the changes. Perhaps you can explain briefly in the commit message. Thanks.

::: testing/marionette/harness/marionette_harness/tests/unit/test_crash.py
(Diff revision 1)
>  class TestCrash(BaseCrashTestCase):
>  
>      def test_crash_chrome_process(self):
> -        with self.assertRaises(IOError):
> -            self.crash(chrome=True)
> +        self.assertRaisesRegexp(IOError, "Process crashed",
> +                                self.crash, chrome=True)
> -            Wait(self.marionette, timeout=self.socket_timeout,

Are you sure it's okay to remove the Wait here and elsewhere? Why is it not necessary anymore? Presumably there can still be a delay before the error is raised...
Attachment #8940672 - Flags: review?(mjzffr) → review-
Comment on attachment 8940672 [details]
Bug 1428740 - Improve Marionette unit tests for parent and content crashes.

https://reviewboard.mozilla.org/r/210920/#review217198

Ups, I forgot something. I will do.

> Are you sure it's okay to remove the Wait here and elsewhere? Why is it not necessary anymore? Presumably there can still be a delay before the error is raised...

This wait should have only added for content crashes but not a parent (chrome) crash, which immediately kills the process. Also the failure was incorrect. Not sure why this landed...
Comment on attachment 8940672 [details]
Bug 1428740 - Improve Marionette unit tests for parent and content crashes.

https://reviewboard.mozilla.org/r/210920/#review217304
Attachment #8940672 - Flags: review?(mjzffr) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59bb34f20076
Improve Marionette unit tests for parent and content crashes. r=maja_zf
https://hg.mozilla.org/mozilla-central/rev/59bb34f20076
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: