Open Bug 1453832 Opened 6 years ago Updated 2 years ago

Unit tests fail when DNS providers return an address for one that should be invalid.

Categories

(Testing :: XPCShell Harness, defect, P3)

61 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: mcalabrese85, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce:

Ran unit tests for the telemetry system. 


Actual results:

Unite test toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js failed due to lwttest.invalid returning a valid address from the DNS provider. Test returns:

FATAL ERROR: Non-local network connections are disabled and a connection attempt to lwttest.invalid (198.105.254.228) was made.
You should only access hostnames available via the test networking proxy (if running mochitests) or from a test-specific httpd.js server (if running xpcshell tests). Browser services should be disabled or redirected to a local server.


Expected results:

Test should have passed
Component: Untriaged → Networking: DNS
Product: Firefox → Core
Component: Networking: DNS → XPCShell Harness
Product: Core → Testing
This is an infra problem, but I'm not sure this is strictly xpcshell harness thing.
You should be able to workaround this issue by setting environment variable MOZ_DISABLE_NONLOCAL_CONNECTIONS=0 (or perhaps manipulating DNS).

Another way of looking at this is that tests should not use "lwttest.invalid", but it does seem an appropriate invalid name, does not resolve on my local server, and doesn't give us trouble in continuous integration.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.