Bug 1625563 - Add a delay to test_trr.js::test_resolve_not_confirmed to avoid Android intermittent r=dragana

Differential Revision: https://phabricator.services.mozilla.com/D69825

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2020-04-10 19:41:16 +00:00
parent 4452860213
commit d6d532ed31

View File

@ -1730,6 +1730,12 @@ add_task(async function test_resolve_not_confirmed() {
// Check that the confirmation eventually completes.
let count = 100;
while (count > 0) {
if (count == 50 || count == 10) {
// At these two points we do a longer timeout to account for a slow
// response on the server side. This is usually a problem on the Android
// because of the increased delay between the emulator and host.
await new Promise(resolve => do_timeout(100 * (100 / count), resolve));
}
let [inRequest, inRecord, inStatus] = await new DNSListener(
`ip${count}.example.org`,
undefined,