Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
watson authored Dec 6, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 0938282 commit 8395825
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -25,9 +25,13 @@ before_script:

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

jobs:
fast_finish: true
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"
6 changes: 3 additions & 3 deletions test/instrumentation/modules/restify.js
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 8395825

Please sign in to comment.