Skip to content

Commit aa0f682

Browse files
committed
test(ci): allow tests to run on Node 8.0.0->8.5.0
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
1 parent ebb125e commit aa0f682

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/instrumentation/modules/restify.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test('transaction name', function (t) {
3939

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

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

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

0 commit comments

Comments
 (0)