Remove tearDownModule is not defined error

RESOLVED FIXED

Status

Testing Graveyard
Mozmill
RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: aaronmt, Assigned: whimboo)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
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
(Reporter)

Updated

7 years ago
Whiteboard: [mozmill-1.5.2+]
(Reporter)

Updated

7 years ago
Blocks: 608139
(Assignee)

Comment 1

7 years ago
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?]
(Assignee)

Updated

7 years ago
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.
(Assignee)

Comment 3

7 years ago
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.
(Assignee)

Comment 4

7 years ago
I think there is no need for mozmill-1.5.2 then.
No longer blocks: 608139
Whiteboard: [mozmill-1.5.2?]
(Reporter)

Comment 5

7 years ago
(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
(Assignee)

Comment 6

7 years ago
I cannot see this problem with Mzomill 1.5.1 and a function without a teardownModule function.
(Reporter)

Comment 7

7 years ago
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
(Assignee)

Comment 8

7 years ago
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?
(Reporter)

Comment 9

7 years ago
(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.
(Assignee)

Comment 10

7 years ago
Created attachment 506257 [details] [diff] [review]
Patch v1
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #506257 - Flags: review?(aaron.train)
(Reporter)

Updated

7 years ago
Attachment #506257 - Flags: review?(aaron.train) → review+
(Assignee)

Comment 11

7 years ago
Landed as:
http://hg.mozilla.org/qa/mozmill-tests/rev/e6ce2dd0e5d6
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.