Closed Bug 883739 Opened 11 years ago Closed 11 years ago

test_update.js accesses https://services.addons.mozilla.org (and, indirectly, http://ocsp.verisign.com) during test run

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: briansmith, Assigned: Irving)

Details

Attachments

(3 files, 1 obsolete file)

When I pushed my patch for bug 754356 to tryserver, I found that test_update.js was timing out on all platforms, causing the xpcshell tests to go orange.

Investigating locally, I noticed that this test #20 in test_update.js ends up attempting to send a request to https://services.addons.mozilla.org (and also http://ocsp.verisign.com, for the OCSP response of the cert). This seems very wrong to me, because (a) none of the other 19 tests in the file seem to be contacting services.addons.mozilla.org, and (b) no xpcshell tests should be making external network requests.

It would be great if somebody who works on addon updates could take a look at this, because it is blocking me from landing bug 754356, which I'm hoping to do for Firefox 24.

I am attaching a patch which disables test #20 of test_update.js, which causes the accesses to https://services.addons.mozilla.org to stop. This isn't meant to be a solution, but rather it just demonstrates that test #20 (continue_test_20 / check_test_20) seems to be the thing to blame.
I am attaching an NSPR nsHttp:5 log showing the network access. Search for https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/guid:addon12%40tests.mozilla.org?src=firefox&appOS=XPCShell&appVersion=1.

Also, here is the try run for bug 754356 that shows the xpcshell tests going orange because of the time out. Note that my patch for bug 754356 removes some timeout logic for HTTPS requests which (AFAICT) should not be necessary in Gecko any more. So, it isn't surprising that the patch for this bug would make this problem more notable. Note that my issue actually seems to be caused by a **crash**, not due to a network timeout: https://tbpl.mozilla.org/php/getParsedLog.php?id=24215512&tree=Try#error2

So, there seem to be two separate issues. This bug is supposed to be about the network access to https://services.addons.mozilla.org by the test. I will file another bug (if it isn't caused by my own patch) for the crash.
No longer blocks: 754356
Also pulled out const definitions into head_addons.js and made them consistent.
Assignee: nobody → irving
Status: NEW → ASSIGNED
Attachment #8348995 - Flags: review?(dtownsend+bugmail)
Comment on attachment 8348995 [details] [diff] [review]
Set the correct preference so test_update.js does not access services.a.m.o

Review of attachment 8348995 [details] [diff] [review]:
-----------------------------------------------------------------

I'm a little confused. Was there a typo in the pref in test_update.js or something? I can't see any difference between the constant removed from test_update.js and that added to head_addons.js.
Somehow managed to make the first patch with all the incidental junk and not the one statement that fixed the problem. test_update.js around line 1180 is the part that actually matters.
Attachment #8348995 - Attachment is obsolete: true
Attachment #8348995 - Flags: review?(dtownsend+bugmail)
Attachment #8349500 - Flags: review?(dtownsend+bugmail)
Comment on attachment 8349500 [details] [diff] [review]
Set the correct preference so test_update.js does not access services.a.m.o, this time actually setting the pref

Review of attachment 8349500 [details] [diff] [review]:
-----------------------------------------------------------------

Much better!
Attachment #8349500 - Flags: review?(dtownsend+bugmail) → review+
This doesn't need a build of its own.
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/e73e2e4ab984
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/e73e2e4ab984
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: