Add connectTimeout to test

This commit is contained in:
Martin Cizek 2020-09-17 07:35:53 +02:00
parent f9ae5c12d8
commit 543cb976f3
1 changed files with 4 additions and 2 deletions

View File

@ -384,7 +384,8 @@ tap.test('createClient', t => {
url: [ url: [
`ldap://0.0.0.0:${unusedPortNumber}`, `ldap://0.0.0.0:${unusedPortNumber}`,
`ldap://0.0.0.1:${unusedPortNumber}` `ldap://0.0.0.1:${unusedPortNumber}`
] ],
connectTimeout: 1
}) })
t.equal(client.servers.length, 2) t.equal(client.servers.length, 2)
@ -394,7 +395,8 @@ tap.test('createClient', t => {
t.test('url string is correctly parsed and assigned', async t => { t.test('url string is correctly parsed and assigned', async t => {
getPort().then(function (unusedPortNumber) { getPort().then(function (unusedPortNumber) {
const client = ldap.createClient({ const client = ldap.createClient({
url: `ldap://0.0.0.0:${unusedPortNumber},0.0.0.1:${unusedPortNumber}` url: `ldap://0.0.0.0:${unusedPortNumber},0.0.0.1:${unusedPortNumber}`,
connectTimeout: 1
}) })
t.equal(client.servers.length, 2) t.equal(client.servers.length, 2)