diff --git a/test/versioned/fastify/add-hook.tap.js b/test/versioned/fastify/add-hook.tap.js index c40182c03b..2b489904ff 100644 --- a/test/versioned/fastify/add-hook.tap.js +++ b/test/versioned/fastify/add-hook.tap.js @@ -108,7 +108,7 @@ tap.test('fastify hook instrumentation', (t) => { t.assertSegments(transaction.trace.root, expectedSegments) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const result = await common.makeRequest(address, '/add-hook') t.same(result, { hello: 'world' }) @@ -164,7 +164,7 @@ tap.test('fastify hook instrumentation', (t) => { t.assertSegments(transaction.trace.root, expectedSegments) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const result = await common.makeRequest(address, '/error') t.ok(ok) diff --git a/test/versioned/fastify/code-level-metrics-hooks.tap.js b/test/versioned/fastify/code-level-metrics-hooks.tap.js index 3349736812..c86d9b451d 100644 --- a/test/versioned/fastify/code-level-metrics-hooks.tap.js +++ b/test/versioned/fastify/code-level-metrics-hooks.tap.js @@ -73,7 +73,7 @@ tap.test('Fastify CLM Hook Based', (test) => { }) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const result = await common.makeRequest(address, '/add-hook') diff --git a/test/versioned/fastify/code-level-metrics-middleware.tap.js b/test/versioned/fastify/code-level-metrics-middleware.tap.js index fcfcceeb0c..0497a975b9 100644 --- a/test/versioned/fastify/code-level-metrics-middleware.tap.js +++ b/test/versioned/fastify/code-level-metrics-middleware.tap.js @@ -103,7 +103,7 @@ tap.test('Fastify CLM Middleware Based', (test) => { assertSegments(t, transaction.trace.root.children[0], isCLMEnabled) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const result = await common.makeRequest(address, uri) diff --git a/test/versioned/fastify/errors.tap.js b/test/versioned/fastify/errors.tap.js index 2851062df7..587e0550aa 100644 --- a/test/versioned/fastify/errors.tap.js +++ b/test/versioned/fastify/errors.tap.js @@ -31,7 +31,7 @@ tap.test('Test Errors', async (test) => { next(err) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const res = await makeRequest(address, '/404-via-reply') test.equal(res.statusCode, 404) diff --git a/test/versioned/fastify/naming-common.js b/test/versioned/fastify/naming-common.js index 79f9c9875c..4b692c2a6c 100644 --- a/test/versioned/fastify/naming-common.js +++ b/test/versioned/fastify/naming-common.js @@ -39,7 +39,7 @@ module.exports = function createTests(t, getExpectedSegments) { t.assertSegments(transaction.trace.root, expectedSegments) }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() const result = await makeRequest(address, uri) t.equal(result.called, uri, `${uri} url did not error`) diff --git a/test/versioned/fastify/new-state-tracking.tap.js b/test/versioned/fastify/new-state-tracking.tap.js index c9b723c517..d9eb76d856 100644 --- a/test/versioned/fastify/new-state-tracking.tap.js +++ b/test/versioned/fastify/new-state-tracking.tap.js @@ -37,7 +37,7 @@ tap.test('fastify with new state tracking', (t) => { return { hello: 'world' } }) - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address() @@ -65,7 +65,7 @@ tap.test('fastify with new state tracking', (t) => { }) } - await fastify.listen(0) + await fastify.listen({ port: 0 }) const address = fastify.server.address()