Skip to content

Commit

Permalink
test: deflake test-dns
Browse files Browse the repository at this point in the history
Prevent responses from being cached.

Fixes: #54124
PR-URL: #54902
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
lpinca authored and targos committed Sep 26, 2024
1 parent 5c9cd42 commit e09cbab
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/parallel/test-dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,11 @@ assert.throws(() => {
const cases = [
{ method: 'resolveAny',
answers: [
{ type: 'A', address: '1.2.3.4', ttl: 3333333333 },
{ type: 'AAAA', address: '::42', ttl: 3333333333 },
{ type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 3333333333 },
{ type: 'NS', value: 'foobar.org', ttl: 3333333333 },
{ type: 'PTR', value: 'baz.org', ttl: 3333333333 },
{ type: 'A', address: '1.2.3.4', ttl: 0 },
{ type: 'AAAA', address: '::42', ttl: 0 },
{ type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 0 },
{ type: 'NS', value: 'foobar.org', ttl: 0 },
{ type: 'PTR', value: 'baz.org', ttl: 0 },
{
type: 'SOA',
nsname: 'ns1.example.com',
Expand All @@ -380,11 +380,11 @@ assert.throws(() => {

{ method: 'resolve4',
options: { ttl: true },
answers: [ { type: 'A', address: '1.2.3.4', ttl: 3333333333 } ] },
answers: [ { type: 'A', address: '1.2.3.4', ttl: 0 } ] },

{ method: 'resolve6',
options: { ttl: true },
answers: [ { type: 'AAAA', address: '::42', ttl: 3333333333 } ] },
answers: [ { type: 'AAAA', address: '::42', ttl: 0 } ] },

{ method: 'resolveSoa',
answers: [
Expand Down Expand Up @@ -415,7 +415,7 @@ assert.throws(() => {
(answer) => Object.assign({ domain }, answer)
),
}), port, address);
}, cases.length));
}, cases.length * 2 - 1));

server.bind(0, common.mustCall(() => {
const address = server.address();
Expand Down

0 comments on commit e09cbab

Please sign in to comment.