Closed Bug 720985 Opened 13 years ago Closed 13 years ago

Report a failure when a test leaks a global variable

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla13

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(2 files, 1 obsolete file)

No description provided.
Attached patch rough patch (obsolete) — Splinter Review
this works, but we'll need to whitelist a few expected properties and known failures
O(n²) :(
(In reply to Jesse Ruderman from comment #2) > O(n²) :( This is only testing code. As long as it doesn't cause the test suite to take significantly longer, who cares?
Attached patch patchSplinter Review
Attachment #591436 - Attachment is obsolete: true
Attachment #591756 - Flags: review?(gavin.sharp)
Why do each of those properties need to be in the whitelist?
"navigator", "constructor" and "Application" because they seem to enter the keys list lazily. "__SS_tabsToRestore" are more like known real failures "webConsoleCommandController" and wouldn't be needed ideally.
(In reply to Dão Gottwald [:dao] from comment #3) > As long as it doesn't cause the test suite to take significantly longer, who cares? Seems reasonable - did you test whether it has any impact on test suite run time?
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #7) > Seems reasonable - did you test whether it has any impact on test suite run > time? I tested this on try (linux64/macosx64/win32 x debug/opt) and saw no meaningful difference. Sometimes it took a minute less, sometimes more, most of the time the same. If there's a difference I think it adds up to a few seconds at most. Many single tests probably take longer. (In reply to Dão Gottwald [:dao] from comment #6) > "__SS_tabsToRestore" are more like known real failures > "webConsoleCommandController" and wouldn't be needed ideally. Hm, that sentence fell apart. "webConsoleCommandController" and "__SS_tabsToRestore" are more like known real failures and wouldn't be needed ideally.
Attachment #591756 - Flags: review?(gavin.sharp) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Attachment #594190 - Flags: review?(dao) → review+
Depends on: 723953
Followup landed: https://hg.mozilla.org/mozilla-central/rev/e9183168a27d Filed bug 723953 to fix the Fennec tests for real.
Depends on: 725529
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: