Closed Bug 475322 Opened 16 years ago Closed 15 years ago

Browser chrome test harness shouldn't use a periodic poller

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: mossop, Assigned: mossop)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch patch rev 1 (obsolete) — Splinter Review
This removes the poller and instead uses executeSoon to allow the existing script to finish up whatever it is doing.

This should save us about 1.5 seconds per test file which is a fairly worthwhile saving I think. Downside is that it adds some extra entries to the test's scope, not sure how much of a problem it is, certainly all existing browser chrome tests pass with the changes.

I noticed that the timeout doesn't include the synchronous portion of the test, not sure if we ever want to change that?
Attachment #358821 - Flags: review?(gavin.sharp)
Status: NEW → ASSIGNED
Attachment #358821 - Flags: review?(gavin.sharp) → review?(sdwilsh)
Attachment #358821 - Flags: review?(sdwilsh)
Attached patch patch rev 2Splinter Review
This just fixes the timeout test to fail with the longer timeouts. gavin gave r+ over IRC
Attachment #358821 - Attachment is obsolete: true
Attachment #364123 - Flags: review+
Landed: http://hg.mozilla.org/mozilla-central/rev/37d6dfd70bac
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Are you going to land this on branches as well? I think it's a good idea to keep the harness in sync between branches as much as possible.
(In reply to comment #4)
> Are you going to land this on branches as well? I think it's a good idea to
> keep the harness in sync between branches as much as possible.

Yes when I get enough free time to watch the tree (likely Wednesday), or someone else can land it.
Target Milestone: --- → mozilla1.9.2a1
johnath and I noticed something odd on 1.9.1 - a test "timed out" but then reported results. Shouldn't we cancel the waitTimer outside of the executeSoon (i.e. immediately)?
(In reply to comment #7)
> johnath and I noticed something odd on 1.9.1 - a test "timed out" but then
> reported results. Shouldn't we cancel the waitTimer outside of the executeSoon
> (i.e. immediately)?

This is certainly not a new problem. The issue is that while we can detect a test has been running too long and start the next one, we have no way of stopping whatever the existing test is doing. If a network operation or such was just taking a really long time it will eventually report back and the test will continue. Cancelling the waitTimer outside the executeSoon isn't going to help in anyway that I can spot (except it might catch a case where the timeout is pending when the test calls finish, in which case you'd see a timeout and nothing after it).

What we would probably need to do (and it is only a way of hiding this) is to stop pushing test results after a timeout has occurred. I tend to think though that there is value in knowing that the test was actually still going albeit slowly.
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: