diff --git a/test/parallel/test-dns-resolveany-bad-ancount.js b/test/parallel/test-dns-resolveany-bad-ancount.js index 71fcbe03cd58f1..5cea388ad6a9f0 100644 --- a/test/parallel/test-dns-resolveany-bad-ancount.js +++ b/test/parallel/test-dns-resolveany-bad-ancount.js @@ -30,13 +30,14 @@ server.bind(0, common.mustCall(async () => { dnsPromises.resolveAny('example.org') .then(common.mustNotCall()) .catch(common.expectsError({ - code: 'EBADRESP', + // May return EBADRESP or ETIMEOUT + code: /^(?:EBADRESP|ETIMEOUT)$/, syscall: 'queryAny', hostname: 'example.org' })); dns.resolveAny('example.org', common.mustCall((err) => { - assert.strictEqual(err.code, 'EBADRESP'); + assert.notStrictEqual(err.code, 'SUCCESS'); assert.strictEqual(err.syscall, 'queryAny'); assert.strictEqual(err.hostname, 'example.org'); const descriptor = Object.getOwnPropertyDescriptor(err, 'message'); diff --git a/test/parallel/test-dns-resolveany.js b/test/parallel/test-dns-resolveany.js index 0bbfe8f9f18432..f64dbfc93e2da8 100644 --- a/test/parallel/test-dns-resolveany.js +++ b/test/parallel/test-dns-resolveany.js @@ -11,7 +11,7 @@ const answers = [ { type: 'AAAA', address: '::42', ttl: 123 }, { type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 124 }, { type: 'NS', value: 'foobar.org', ttl: 457 }, - { type: 'TXT', entries: [ 'v=spf1 ~all', 'xyz\0foo' ] }, + { type: 'TXT', entries: [ 'v=spf1 ~all xyz\0foo' ] }, { type: 'PTR', value: 'baz.org', ttl: 987 }, { type: 'SOA',