Skip to content

Commit

Permalink
test(ci): allow tests to run on Node 8.0.0->8.5.0
Browse files Browse the repository at this point in the history
Early versions of Node.js 8 had a regression around the handling of
`null` as the port passed to `Server#listen()`. For details see:

nodejs/node#14221
  • Loading branch information
watson committed Dec 5, 2018
1 parent ebb125e commit aa0f682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/instrumentation/modules/restify.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test('transaction name', function (t) {

// NOTE: Hostname must be supplied to force IPv4 mode,
// otherwise this will use IPv6, which fails on Travis CI.
server.listen(null, '0.0.0.0', function () {
server.listen(0, '0.0.0.0', function () {
const req = http.get(`${server.url}/hello/world`, res => {
const chunks = []
res.on('data', chunks.push.bind(chunks))
Expand Down Expand Up @@ -95,7 +95,7 @@ test('error reporting', function (t) {

// NOTE: Hostname must be supplied to force IPv4 mode,
// otherwise this will use IPv6, which fails on Travis CI.
server.listen(null, '0.0.0.0', function () {
server.listen(0, '0.0.0.0', function () {
const req = http.get(`${server.url}/hello/world`, res => {
res.resume()
res.on('end', () => {
Expand Down Expand Up @@ -147,7 +147,7 @@ test('error reporting from chained handler', function (t) {

// NOTE: Hostname must be supplied to force IPv4 mode,
// otherwise this will use IPv6, which fails on Travis CI.
server.listen(null, '0.0.0.0', function () {
server.listen(0, '0.0.0.0', function () {
const req = http.get(`${server.url}/hello/world`, res => {
res.resume()
res.on('end', () => {
Expand Down

0 comments on commit aa0f682

Please sign in to comment.