You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ava to set up multiple CDCT tests starting with this:
const test = require('ava')
const getPort = require('get-port')
const { Pact } = require('@pact-foundation/pact')
...
test.before('async() => {
port = await getPort()
console.log(`Setting up port ${port}`)
provider = new Pact({
port,
...
})
await provider.setup()
})
...
Works great, tests are running in parallel and different ports are used:
Setting up on port 64873
Setting up on port 64874
But Pact gives me a warning saying I'm using a port outside it's recommended range:
WARN: pact-node@10.2.2/90509 on MBP.localdomain: Like a Boss, you used a port outside of the recommended range (1024 to 49151); I too like to live dangerously.
While it's just a warning, it's still not nice, so I change it to this:
test.before('async() => {
port = await getPort({ port: getPort.makeRange(1024, 49151) })
console.log(`Setting up port ${port}`)
...
})
But then both end up to be on the same port and my tests fail
Setting up on port 1024
Setting up on port 1024
Could the makeRange be randomized the same way as the default behaviour is?
The text was updated successfully, but these errors were encountered:
I'm using
ava
to set up multiple CDCT tests starting with this:Works great, tests are running in parallel and different ports are used:
But Pact gives me a warning saying I'm using a port outside it's recommended range:
While it's just a warning, it's still not nice, so I change it to this:
But then both end up to be on the same port and my tests fail
Could the
makeRange
be randomized the same way as the default behaviour is?The text was updated successfully, but these errors were encountered: