Tests are failing, while npm run test
pacostas opened this issue · comments
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
Steps to reproduce
OS on virtual machine:
Linux fedora 6.7.4-200.fc39.x86_64
Node version:
20.11.1
Steps:
- git clone https://github.com/fastify/fastify.git
- cd fastify
- npm i
- npm run test
Gives below 2 errors:
- error 1
FAIL test/async-await.test.js 81 OK 1s
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/async-await.test.js
exitCode: null
signal: SIGTERM
FAIL TAP
✖ test/async-await.test.js
test: TAP
env: {}
file: test/async-await.test.js
timeout: 30000
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/async-await.test.js
stdio:
- 0
- pipe
- 2
cwd: /home/costas/Desktop/fastify
exitCode: null
signal: SIGTERM
FAIL test/hooks.on-listen.test.js 165 OK 523.559ms
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/hooks.on-listen.test.js
exitCode: null
signal: SIGTERM
FAIL TAP
✖ test/hooks.on-listen.test.js
test: TAP
env: {}
file: test/hooks.on-listen.test.js
timeout: 30000
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/hooks.on-listen.test.js
stdio:
- 0
- pipe
- 2
cwd: /home/costas/Desktop/fastify
exitCode: null
signal: SIGTERM
FAIL test/internals/reply.test.js 346 OK 2s
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/internals/reply.test.js
exitCode: null
signal: SIGTERM
FAIL TAP
✖ test/internals/reply.test.js
test: TAP
env: {}
file: test/internals/reply.test.js
timeout: 30000
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/internals/reply.test.js
stdio:
- 0
- pipe
- 2
cwd: /home/costas/Desktop/fastify
exitCode: null
signal: SIGTERM
- error 2
FAIL test/hooks.on-listen.test.js 165 OK 523.559ms
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/hooks.on-listen.test.js
exitCode: null
signal: SIGTERM
FAIL test/internals/reply.test.js 346 OK 2s
command: /home/costas/.nvm/versions/node/v20.11.1/bin/node
args:
- --allow-natives-syntax
- test/internals/reply.test.js
exitCode: null
signal: SIGTERM
Things seem fine on MacOS, could be dependent on your environment or maybe Linux, but CI looks OK too...
Thanks for trying that out on MacOS. The issue seems to be on Fedora and probably on linux in general I'm also able to reproduce it in ubuntu with docker.
FROM ubuntu:22.04
WORKDIR /app
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs git
RUN git clone https://github.com/fastify/fastify.git && cd fastify && npm i && npm run test
The error on the descirption of the issue is produced from a clean virtual machine with fedora without tweaking any of the configuration. Do you know if i need any specific configuration for the tests to pass? I also see that it fails on citgm too https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3404/nodes=alpine-last-latest-x64/testReport/junit/(root)/citgm/fastify_v4_26_2/
The reference on CITGM
is irrelevant, it fails because it cannot connect to the address, the error EADDRNOTAVAIL
is unrelated to fastify
.