Closed Bug 1440164 Opened 6 years ago Closed 6 years ago

APZ test hangs if subtest file is not added to mochitest.ini

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: botond, Assigned: botond)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 1 obsolete file)

STR:

  1. Write a new APZ mochitest helper_*.html file.
  2. Add it as a subtest to a test group like test_group_wheelevents.html.
  3. Forget to add it to support-files mochitest.ini
  4. Run the test group

Expected results:

  You get some sort of error message about the missing file.

Actual results:

  The test run hangs.

I just spent a lot of time debugging such a hang, only to realize that its cause is the sort of thing you'd expect to be caught as an immediate error.
(In reply to Botond Ballo [:botond] from comment #0)
>   3. Forget to add it to support-files mochitest.ini

That should say "to the support-files section in mochitest.ini".
Priority: -- → P3
Whiteboard: [gfx-noted]
Assignee: nobody → botond
(Going back to MozReview for the time being. There's no Autoland for Phabricator yet, and posting a series of patches is too much work.)
Comment on attachment 8953706 [details]
Bug 1440164 - Call SimpleTest.finish() in runSubtestsSeriallyInFreshWindows(), instead of relying on its caller to call it.

https://reviewboard.mozilla.org/r/222938/#review228836

::: gfx/layers/apz/test/mochitest/test_group_hittest.html:35
(Diff revision 1)
>    SimpleTest.waitForExplicitFinish();
>    window.onload = function() {
> -    runSubtestsSeriallyInFreshWindows(subtests)
> +    runSubtestsSeriallyInFreshWindows(subtests);
> -    .then(SimpleTest.finish);

I don't like that the waitForExplicitFinish() call happens in the test, but the finish call happens elsewhere. Although I don't feel too strongly about it - maybe if we renamed the function to runSubtestsSeriallyInFreshWindowsAndFinish it would be a little better? Or we could drop this part 1 and just update all the test files to do .then(SimpleTest.finish, SimpleTest.finish)?

I kind of prefer the latter in case we write one of these tests that has additional cleanup to do after running the subtests but before calling SimpleTest.finish.
Attachment #8953706 - Flags: review?(bugmail) → review+
Comment on attachment 8953707 [details]
Bug 1440164 - Call SimpleTest.finish() in runSubtestsSeriallyInFreshWindows() even if running subtests failed.

https://reviewboard.mozilla.org/r/222940/#review228838
Attachment #8953707 - Flags: review?(bugmail) → review+
Comment on attachment 8953708 [details]
Bug 1440164 - Detect a subtest URL not resolving and give an error message.

https://reviewboard.mozilla.org/r/222942/#review228840
Attachment #8953708 - Flags: review?(bugmail) → review+
(In reply to Botond Ballo [:botond] from comment #6)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=3b1e04616876f1b037bbd366b37c49b0c35104d9

Looks like I missed a call to runSubtestsSeriallyInFreshWindows() in dom/events/test/pointerevents/test_touch_action.html.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #7)
> I don't like that the waitForExplicitFinish() call happens in the test, but
> the finish call happens elsewhere. 

Good point, that's not great.

> Or
> we could drop this part 1 and just update all the test files to do
> .then(SimpleTest.finish, SimpleTest.finish)?
> 
> I kind of prefer the latter in case we write one of these tests that has
> additional cleanup to do after running the subtests but before calling
> SimpleTest.finish.

I don't love the repetition but I don't have a better idea, so let's do that.
Attachment #8953706 - Attachment is obsolete: true
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da952030e9e4
Call SimpleTest.finish() in runSubtestsSeriallyInFreshWindows() even if running subtests failed. r=kats
https://hg.mozilla.org/integration/autoland/rev/bbceec48f282
Detect a subtest URL not resolving and give an error message. r=kats
https://hg.mozilla.org/mozilla-central/rev/da952030e9e4
https://hg.mozilla.org/mozilla-central/rev/bbceec48f282
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: