Skip to content

Commit

Permalink
test: bump up DNS timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Apr 18, 2024
1 parent 94d68ad commit 0b21d0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/net_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,7 @@ describe('get_mx', function () {
})

describe('resolve_mx_hosts', function () {

beforeEach((done) => {
this.net_utils = require('../index')
done()
Expand All @@ -1350,13 +1351,15 @@ describe('resolve_mx_hosts', function () {
]

it('resolves mx hosts to IPs, tnpi.net', async () => {
this.timeout(5000)
const r = await this.net_utils.resolve_mx_hosts([
{ exchange: 'mail.theartfarm.com', priority: 10, from_dns: 'tnpi.net' },
])
assert.deepEqual(r, expectedResolvedMx)
})

it('resolves mx hosts to IPs, gmail.com', async () => {
this.timeout(5000)
const mxes = await this.net_utils.get_mx('gmail.com')
assert.equal(mxes.length, 5)
const r = await this.net_utils.resolve_mx_hosts(mxes)
Expand All @@ -1376,14 +1379,13 @@ describe('resolve_mx_hosts', function () {
it('resolve_mx_hosts, gmail.com', async () => {
const mxes = await this.net_utils.get_mx('gmail.com')
const r = await this.net_utils.resolve_mx_hosts(mxes)
// console.log(r)
assert.equal(r.length, 10)
})

it('resolve_mx_hosts, yahoo.com', async () => {
this.timeout(5000)
const mxes = await this.net_utils.get_mx('yahoo.com')
const r = await this.net_utils.resolve_mx_hosts([mxes[0]])
// console.log(r)
assert.equal(r.length, 8)
})
})

0 comments on commit 0b21d0f

Please sign in to comment.