From 839582529588ad3e9e00a96a8460802450085952 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Thu, 6 Dec 2018 16:16:38 +0100 Subject: [PATCH] test(ci): add early supported node versions to test matrix (#705) Early versions of Node.js 8 had a regression around the handling of `null` as the port passed to `Server#listen()`. For details see: https://github.com/nodejs/node/pull/14221 --- .travis.yml | 4 ++++ test/.jenkins_nodejs.yml | 4 ++++ test/instrumentation/modules/restify.js | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3564a18fb05..7d136740015 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,13 @@ before_script: node_js: - '11' + - '11.0' - '10' + - '10.0' - '8' + - '8.1' - '6' + - '6.0' jobs: fast_finish: true diff --git a/test/.jenkins_nodejs.yml b/test/.jenkins_nodejs.yml index 4c66bbc86e9..2749754a725 100644 --- a/test/.jenkins_nodejs.yml +++ b/test/.jenkins_nodejs.yml @@ -1,5 +1,9 @@ NODEJS_VERSION: - "11" + - "11.0" - "10" + - "10.0" - "8" + - "8.1" - "6" + - "6.0" diff --git a/test/instrumentation/modules/restify.js b/test/instrumentation/modules/restify.js index f29712a65fd..c8fe25fdae5 100644 --- a/test/instrumentation/modules/restify.js +++ b/test/instrumentation/modules/restify.js @@ -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 => { t.equal(res.statusCode, 200, 'server should respond with status code 200') const chunks = [] @@ -96,7 +96,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 => { t.equal(res.statusCode, 500, 'server should respond with status code 500') res.resume() @@ -149,7 +149,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 => { t.equal(res.statusCode, 500, 'server should respond with status code 500') res.resume()