Closed
Bug 1422496
Opened 8 years ago
Closed 8 years ago
JAR off-main-thread breaks xpcshell-tests
Categories
(Core :: Networking: JAR, enhancement, P2)
Core
Networking: JAR
Tracking
()
RESOLVED
FIXED
mozilla59
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: xeonchen, Assigned: xeonchen)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(2 files, 4 obsolete files)
|
4.68 KB,
patch
|
rpl
:
review+
|
Details | Diff | Splinter Review |
|
8.05 KB,
patch
|
xeonchen
:
review+
|
Details | Diff | Splinter Review |
After applying patches of bug 1373708, xpcshell-test failed on win32 platform.
[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=ff1839d893f36d838c6317d8c9e0d6a85a53fc9c
| Assignee | ||
Comment 1•8 years ago
|
||
TEST-UNEXPECTED-FAIL | toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js | xpcshell return code: 0
Error: Test cleanup: path c:\\users\\genericworker\\appdata\\local\\temp\\xpc-profile-qiryw8\\extensions\\trash exists when it should not at resource://testing-common/AddonTestUtils.jsm:298 ([1, 2])
[1] https://treeherder.mozilla.org/logviewer.html#?job_id=149131940&repo=try&lineNumber=17375
[2] https://dxr.mozilla.org/mozilla-central/rev/709f355a7a8c4ae426d1824841a71ffdb5ce0137/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm#298
| Assignee | ||
Comment 2•8 years ago
|
||
OK, the test installs an addon, the removes it before the manifest.json's |OnStartRequest|.
That causes the file deletion failure.
| Assignee | ||
Updated•8 years ago
|
Summary: FAIL | toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js → JAR off-main-thread breaks xpcshell-tests on Windows
| Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8938313 -
Flags: review?(dtownsend)
| Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8938314 -
Flags: review?(rhelmer)
| Assignee | ||
Comment 5•8 years ago
|
||
OMG, still long long way to go
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3780dadae68992847ae550ee97f7e3608513f89
| Assignee | ||
Comment 6•8 years ago
|
||
Hi Kris,
In |test_contentscripts_unregister_on_context_unload|, sometimes |check_applied_styles| will be called before |registered_ext_style.css| is loaded.
This patch reduces the failure rate, but it still happens (about 1/10).
Do you have any idea?
Attachment #8938365 -
Flags: feedback?(kmaglione+bmo)
| Assignee | ||
Updated•8 years ago
|
OS: Windows 7 → Unspecified
Summary: JAR off-main-thread breaks xpcshell-tests on Windows → JAR off-main-thread breaks xpcshell-tests
| Assignee | ||
Updated•8 years ago
|
Updated•8 years ago
|
Attachment #8938314 -
Flags: review?(rhelmer) → review?(aswan)
Updated•8 years ago
|
Attachment #8938313 -
Flags: review?(dtownsend) → review?(aswan)
Comment 7•8 years ago
|
||
Comment on attachment 8938313 [details] [diff] [review]
Part 1: make sure install/uninstall complete
Review of attachment 8938313 [details] [diff] [review]:
-----------------------------------------------------------------
uninstalls are synchronous, there's no need to wait for them, and if you have addon objects you can also just call addon.uninstall() instead of going through AddonManagerTesting.uninstallAddonByID()
I'm not sure what the intention is with that test (ie why it doesn't already have a matching uninstall for each install), please get a Telemetry peer to sign off on that change.
::: toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ +1187,5 @@
> "Dictionaries should not appear in active addons.");
>
> TelemetryEnvironment.unregisterChangeListener("testNotInteresting");
> +
> + await dictionaryAddon.startupPromise;
This is a no-op, dictionaries are loaded synchronously.
@@ +1188,5 @@
>
> TelemetryEnvironment.unregisterChangeListener("testNotInteresting");
> +
> + await dictionaryAddon.startupPromise;
> + await AddonManagerTesting.uninstallAddonByID(DICTIONARY_ADDON_ID);
This can also just be dictionaryAddon.uninstall()
Attachment #8938313 -
Flags: review?(aswan) → review+
Comment 8•8 years ago
|
||
Comment on attachment 8938314 [details] [diff] [review]
Part 2: wait for addon.uninstall complete
Review of attachment 8938314 [details] [diff] [review]:
-----------------------------------------------------------------
addon.uninstall() does not return a Promise. Does this patch actually make a difference in tests?
Attachment #8938314 -
Flags: review?(aswan) → review-
| Assignee | ||
Comment 9•8 years ago
|
||
(In reply to Andrew Swan [:aswan] from comment #7)
> Comment on attachment 8938313 [details] [diff] [review]
> Part 1: make sure install/uninstall complete
>
> Review of attachment 8938313 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> uninstalls are synchronous, there's no need to wait for them, and if you
> have addon objects you can also just call addon.uninstall() instead of going
> through AddonManagerTesting.uninstallAddonByID()
> I'm not sure what the intention is with that test (ie why it doesn't already
> have a matching uninstall for each install), please get a Telemetry peer to
> sign off on that change.
>
Hi Georg, do you have any idea why the addons are not uninstalled?
Flags: needinfo?(gfritzsche)
Comment 10•8 years ago
|
||
Comment on attachment 8938313 [details] [diff] [review]
Part 1: make sure install/uninstall complete
Review of attachment 8938313 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ +1188,5 @@
>
> TelemetryEnvironment.unregisterChangeListener("testNotInteresting");
> +
> + await dictionaryAddon.startupPromise;
> + await AddonManagerTesting.uninstallAddonByID(DICTIONARY_ADDON_ID);
From looking through the test, this just happens to work. E.g.:
(1) test_addonsWatch_NotInterestingChange() installs restartless.xpi
(2) checks that restartless.xpi shows up in the telemetry environment data
(3) (addon is not uninstalled)
(4) test_addonsAndPlugins() re-installs (?) restartless.xpi
(5) checks that restartless.xpi shows up in the telemetry environment data
This works with or without (3).
Attachment #8938313 -
Flags: feedback+
| Assignee | ||
Updated•8 years ago
|
Attachment #8938314 -
Attachment is obsolete: true
| Assignee | ||
Updated•8 years ago
|
Attachment #8938365 -
Attachment is obsolete: true
Attachment #8938365 -
Flags: feedback?(kmaglione+bmo)
| Assignee | ||
Comment 11•8 years ago
|
||
fix based on reviewer's comment, and carry r+
Attachment #8940917 -
Flags: review+
| Assignee | ||
Updated•8 years ago
|
Attachment #8938313 -
Attachment is obsolete: true
| Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(gfritzsche)
| Assignee | ||
Comment 12•8 years ago
|
||
Attachment #8941083 -
Flags: review?(lgreco)
Updated•8 years ago
|
Attachment #8941083 -
Flags: review?(lgreco) → review+
| Assignee | ||
Comment 13•8 years ago
|
||
add "part" to log message, carry r+
Attachment #8940917 -
Attachment is obsolete: true
Attachment #8941283 -
Flags: review+
| Assignee | ||
Comment 14•8 years ago
|
||
Keywords: checkin-needed
Comment 15•8 years ago
|
||
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/80022d102ad7
Part 1: make sure install/uninstall complete; r=aswan
https://hg.mozilla.org/integration/mozilla-inbound/rev/1adb2c87c080
Part 2: wait the bg iframe to be loaded in content scripts register unload; r=rpl
Keywords: checkin-needed
Comment 16•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/80022d102ad7
https://hg.mozilla.org/mozilla-central/rev/1adb2c87c080
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•