Closed Bug 972093 Opened 11 years ago Closed 11 years ago

Detect run_next_test() executed during add_task()

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

A few times I've seen weird xpcshell test bugs and behavior caused by calling run_next_test() in an add_task() test. e.g. add_task(function* () { Assert.ok(true); run_next_test(); }); This is absurdly difficult to decipher from the test runner output and is fully preventable. Let's update head.js and ensure this pattern aborts immediately with a very clear error message.
Attached patch Detect run_next_test() during add_task() (obsolete) (deleted) — Splinter Review
If an xpcshell test called run_next_test() from inside an add_task(), bad things would happen. This patch detects that behavior and aborts the test immediately with an actionable error message. https://tbpl.mozilla.org/?tree=Try&rev=231f64241141
Attachment #8375215 - Flags: review?(ted)
Assignee: nobody → gps
Status: NEW → ASSIGNED
I rolled some failures in automation into this patch. I'll keep refreshing until I find them all. Some of these changes may have already landed on other trees. hg should handle the merge like a boss, though. https://tbpl.mozilla.org/?tree=Try&rev=0541461c56bd
Attachment #8375272 - Flags: review?(ted)
Attachment #8375272 - Flags: review?(rnewman)
Attachment #8375215 - Attachment is obsolete: true
Attachment #8375215 - Flags: review?(ted)
Comment on attachment 8375272 [details] [diff] [review] Detect run_next_test() during add_task() Review of attachment 8375272 [details] [diff] [review]: ----------------------------------------------------------------- Uplift it! :D
Attachment #8375272 - Flags: review?(rnewman) → review+
Attachment #8375272 - Flags: review?(ted) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: