Closed Bug 627011 Opened 14 years ago Closed 13 years ago

stop prefetching external URLs in tests

Categories

(Testing :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 628974

People

(Reporter: bhearsum, Unassigned)

Details

In bug 625158 we found that we appear to load w3.org as part of one or more tests. After some hunting, Standard8 believes that this is caused by prefetching in at least some of these tests:
http://mxr.mozilla.org/comm-central/search?string=href%3D%22http%3A%2F%2Fwww.w3.org&find=%2Fmozilla%2Fdom%2Ftests%2Fmochitest%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central

We should do something to make sure prefetching can't load external URLs during tests. At the most extreme, we could disable it altogether for all tests that don't require it.
Ted mentioned on irc that the best option might be to redirect those URLs to a test server. Then we're testing in a configuration that is closer to what we actually ship.
Other than the noise in our logs, why is this a problem?
We hit an issue recently, https://bugzilla.mozilla.org/show_bug.cgi?id=616085, where an external URL that we loaded went down and caused test failures. We want to get rid of this possibility, and eventually turn off external network access for the test machines.
Yes, I understand that.  But my question is why that's an issue for prefetching.  If prefetches fail, they fail.  It's not a big deal, unless the test is specifically testing prefetching (in which case it would be prefetching very specific URIs, and those should in fact be local).

Note also that the prefetch is a DNS prefetch only.  We're not getting the content from the url.  We're just looking up the hostname.  Again, if the lookup fails it fails; not an issue...
Wireshark++, firewall--, the w3.org hits are from bug 628974, and this is probably invalid.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
No longer blocks: 626999
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.