Closed Bug 649343 Opened 14 years ago Closed 14 years ago

multiple intermittent test failures in test-tab-browser.testModuleListenersDontInteract

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: ochameau)

References

Details

Attachments

(1 file)

test-tab-browser.testModuleListenersDontInteract has started failing several tests intermittently on the Mac OS X Leopard testerbox: info: executing 'test-tab-browser.testModuleListenersDontInteract' error: TEST FAILED: test-tab-browser.testModuleListenersDontInteract (failure) error: fail: Correct global number of events (1 != 4) info: Traceback (most recent call last): File "resource://testpkgs-api-utils-lib/timer.js", line 64, in notifyOnTimeout this._callback.apply(null, this._params); File "resource://testpkgs-api-utils-tests/test-tab-browser.js", line 484, in null test.assertEqual(eventCount, 4, "Correct global number of events"); File "resource://testpkgs-api-utils-lib/unit-test.js", line 197, in assertEqual this.fail(message); File "resource://testpkgs-api-utils-lib/unit-test.js", line 115, in fail console.trace(); error: fail: Correct number of events on module 1 (1 != 2) info: Traceback (most recent call last): File "resource://testpkgs-api-utils-lib/timer.js", line 64, in notifyOnTimeout this._callback.apply(null, this._params); File "resource://testpkgs-api-utils-tests/test-tab-browser.js", line 485, in null test.assertEqual(eventModule1, 2, "Correct number of events on module 1"); File "resource://testpkgs-api-utils-lib/unit-test.js", line 197, in assertEqual this.fail(message); File "resource://testpkgs-api-utils-lib/unit-test.js", line 115, in fail console.trace(); error: fail: Correct number of events on module 2 (0 != 2) info: Traceback (most recent call last): File "resource://testpkgs-api-utils-lib/timer.js", line 64, in notifyOnTimeout this._callback.apply(null, this._params); File "resource://testpkgs-api-utils-tests/test-tab-browser.js", line 486, in null test.assertEqual(eventModule2, 2, "Correct number of events on module 2"); File "resource://testpkgs-api-utils-lib/unit-test.js", line 197, in assertEqual this.fail(message); File "resource://testpkgs-api-utils-lib/unit-test.js", line 115, in fail console.trace(); Here are the last three test runs, starting with the most recent one: Fail: http://tinderbox.mozilla.org/showlog.cgi?log=Jetpack/1302619822.1302620096.16518.gz&fulltext=1 Pass: http://tinderbox.mozilla.org/showlog.cgi?log=Jetpack/1302570633.1302570997.5868.gz&fulltext=1 Fail: http://tinderbox.mozilla.org/showlog.cgi?log=Jetpack/1302568347.1302568475.27159.gz&fulltext=1 Setting target milestone to 1.0b5 and priority to P1 as we've done for the other intermittent test failure bugs. Since this one is fresh, perhaps it is being caused by a recent checkin. Does anyone know what might be causing this?
Assignee: nobody → myk
This one is quite easy. It uses a setTimeout of 1s, so if you computer has a lag or is slow, it will fail quite often. I submitted an utility function to solve this kind of unit test failure throught bug 606010. So I'll wait for it to land before fixing this one.
Assignee: myk → poirot.alex
Depends on: 606010
Comment on attachment 528597 [details] [diff] [review] Replace setTimeout by test.waitUntilEqual Looks good, works well (although I can't reproduce the test failure). r=myk
Attachment #528597 - Flags: review?(myk) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: