Closed Bug 627378 Opened 13 years ago Closed 13 years ago

Remove tearDownModule is not defined error

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronmt, Assigned: whimboo)

Details

Attachments

(1 file)

In consensus via e-mail thread it was determined that tearDown function declaration is deemed unnecessary should the test not require one. Thus, it makes sense to remove the error found in the Error Console. Example below.

Tested with 1.5.1

Error: teardownModule is not defined
Source File: resource://mozmill/modules/frame.js -> testThemeInstallUninstall/test2.js
Line: 95
Whiteboard: [mozmill-1.5.2+]
Blocks: 608139
In Mozmill 1.5.2 this would cause our test to fail, because we have a console listener attached.

Andrew, we should make sure to not call the teardownModule function if none exists.
No longer blocks: 608139
Whiteboard: [mozmill-1.5.2+] → [mozmill-1.5.2?]
Blocks: 608139
(In reply to comment #1)
> In Mozmill 1.5.2 this would cause our test to fail, because we have a console
> listener attached.
> 
> Andrew, we should make sure to not call the teardownModule function if none
> exists.

Yesterday we decided to remove the console listener completely (see bug 608139) due to the problem of printing out errors twice and went with Heather's method instead.  I don't think this is an immediate problem for 1.5.2.
Ah, haven't known that. That sounds good then. Aaron, how do you start Mozmill to get this failure? Somehow I don't see it.
I think there is no need for mozmill-1.5.2 then.
No longer blocks: 608139
Whiteboard: [mozmill-1.5.2?]
(In reply to comment #3)
> Ah, haven't known that. That sounds good then. Aaron, how do you start Mozmill
> to get this failure? Somehow I don't see it.

Run with --debug on a test without a tearDownModule and it should appear in Error Console -- tested on 1.5.1
I cannot see this problem with Mzomill 1.5.1 and a function without a teardownModule function.
mozmill-restart -t firefox/restartTests/ -b "../default/firefox" --debug

Console output,

TEST-START | /home/aaronmt/Mozilla/mozmill-tests/firefox/restartTests/testThemeInstallUninstall/test1.js | setupModule
WARNING | setupModule | (SKIP) Bug 569813: New add-ons manager not supported yet
TEST-START | /home/aaronmt/Mozilla/mozmill-tests/firefox/restartTests/testThemeInstallUninstall/test1.js | testInstallTheme
WARNING | testInstallTheme | (SKIP) setupModule failed.
TEST-START | /home/aaronmt/Mozilla/mozmill-tests/firefox/restartTests/testThemeInstallUninstall/test2.js | setupModule


In the console I get Error: teardownModule is not defined
Source File: resource://mozmill/modules/frame.js ->
testThemeInstallUninstall/test2.js
Line: 95
That's a failure in the test, when I have marked all add-ons manager tests as skipped. We should simply remove the skipped line for teardownModule. Are other tests also affected?
(In reply to comment #8)
> That's a failure in the test, when I have marked all add-ons manager tests as
> skipped. We should simply remove the skipped line for teardownModule. Are other
> tests also affected?

Interesting. No, as far as I can see, no other tests are affected that do not have tear downs but are not skipped. The error was misleading.
Attached patch Patch v1Splinter Review
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #506257 - Flags: review?(aaron.train)
Attachment #506257 - Flags: review?(aaron.train) → review+
Landed as:
http://hg.mozilla.org/qa/mozmill-tests/rev/e6ce2dd0e5d6
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: