Skip to content

Commit 597bc14

Browse files
lpincatargos
authored andcommitted
test: deflake test-dns
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>
1 parent a9fc8d9 commit 597bc14

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎test/parallel/test-dns.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,11 @@ assert.throws(() => {
361361
constcases=[
362362
{method: 'resolveAny',
363363
answers: [
364-
{type: 'A',address: '1.2.3.4',ttl: 3333333333},
365-
{type: 'AAAA',address: '::42',ttl: 3333333333},
366-
{type: 'MX',priority: 42,exchange: 'foobar.com',ttl: 3333333333},
367-
{type: 'NS',value: 'foobar.org',ttl: 3333333333},
368-
{type: 'PTR',value: 'baz.org',ttl: 3333333333},
364+
{type: 'A',address: '1.2.3.4',ttl: 0},
365+
{type: 'AAAA',address: '::42',ttl: 0},
366+
{type: 'MX',priority: 42,exchange: 'foobar.com',ttl: 0},
367+
{type: 'NS',value: 'foobar.org',ttl: 0},
368+
{type: 'PTR',value: 'baz.org',ttl: 0},
369369
{
370370
type: 'SOA',
371371
nsname: 'ns1.example.com',
@@ -380,11 +380,11 @@ assert.throws(() => {
380380

381381
{method: 'resolve4',
382382
options: {ttl: true},
383-
answers: [{type: 'A',address: '1.2.3.4',ttl: 3333333333}]},
383+
answers: [{type: 'A',address: '1.2.3.4',ttl: 0}]},
384384

385385
{method: 'resolve6',
386386
options: {ttl: true},
387-
answers: [{type: 'AAAA',address: '::42',ttl: 3333333333}]},
387+
answers: [{type: 'AAAA',address: '::42',ttl: 0}]},
388388

389389
{method: 'resolveSoa',
390390
answers: [
@@ -415,7 +415,7 @@ assert.throws(() => {
415415
(answer)=>Object.assign({ domain },answer)
416416
),
417417
}),port,address);
418-
},cases.length));
418+
},cases.length*2-1));
419419

420420
server.bind(0,common.mustCall(()=>{
421421
constaddress=server.address();

0 commit comments

Comments
 (0)