Tests time out when run repeatedly




5 years ago
5 years ago


(Reporter: ggp, Unassigned)


Firefox Tracking Flags

(Not tracked)




5 years ago
When running geolocation tests repeatedly, using:

./mach mochitest-plain dom/tests/mochitest/geolocation --repeat N

the tests start to time out after a few iterations. Typically a low N such as 1 or 2 is enough to reproduce the issue.

After some digging, it seems that the tests time out because the test server network_geolocation.sjs simply stops getting requests from the network provider, even though it is still up and running, since I can access it using curl. After the timeout, several of the XHRs attempted by the network provider result in error (that is, have their onerror callback called).

I wonder if we're hitting some sort of limit to how many XHRs can be done by a single page? I've found that throttling the number of requests the network provider does while testing alleviates the problem and gets more iterations of the tests to run: replacing 200 with 5000 or so at https://mxr.mozilla.org/mozilla-central/source/dom/system/NetworkGeolocationProvider.js#101 , for instance, causes one request to be fired every 5 seconds instead of 200ms.

Filing this bug in case someone else comes across this issue. I can investigate this further if it turns out to be a bigger problem.
You need to log in before you can comment on or make changes to this bug.