Skip to content

Commit

Permalink
test(ci): add early supported node versions to test matrix (#705)
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 6, 2018
1 parent 0938282 commit 0e82351
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ before_script:

node_js:
- '11'
- '11.0'
- '10'
- '10.0'
- '8'
- '8.1'
- '6'
- '6.0'

jobs:
fast_finish: true
Expand Down
4 changes: 4 additions & 0 deletions test/.jenkins_nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
NODEJS_VERSION:
- "11"
- "11.0"
- "10"
- "10.0"
- "8"
- "8.1"
- "6"
- "6.0"
8 changes: 4 additions & 4 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 => {
t.equal(res.statusCode, 200, 'server should respond with status code 200')
const chunks = []
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -211,7 +211,7 @@ test('error reporting from chained handler given as array', 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()
Expand Down

0 comments on commit 0e82351

Please sign in to comment.