Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite failed on test_client_fastify #391

Open
phracek opened this issue May 25, 2023 · 9 comments
Open

Test suite failed on test_client_fastify #391

phracek opened this issue May 25, 2023 · 9 comments

Comments

@phracek
Copy link
Member

phracek commented May 25, 2023

Container platform

Podman/Docker

Version

NodeJS -16

OS version of the container image

RHEL 9

Bugzilla, Jira

No response

Description

The test suite is failing on RHEL9.

This is a similar problem to pino #381

 [PASSED] for 'clients' test_client_cloudevents (00:01:52)
 [FAILED] for 'clients' test_client_fastify (00:07:04)
 [PASSED] for 'binary' test_run_binary_application (00:02:18)

Tests for ubi9/nodejs-16:1 failed.
errexit on line 38, common/test.sh

The test is causing failure and our nightly builds and normal tests by each PR brings more time to analyze a problem.
It would be nice to fix it or removing. Or maybe let's add two tests. First one for fastify which will be stable and has to passed and second one which will be used from the latest fastify repo and in case of failure it will be marked as unstable

Reproducer

-----------------------------------------------
Running test test_client_fastify (starting at 2023-05-24 22:03:28-04:00) ... 
-----------------------------------------------
Running fastify client test
Running fastify test suite
Cloning into '/tmp/daily_scl_tests-rhel9-test/s2i-nodejs-container/test/fastify'...
STEP 1/11: FROM ubi9/nodejs-16:1
STEP 2/11: LABEL "io.openshift.s2i.build.image"="ubi9/nodejs-16:1"       "io.openshift.s2i.build.source-location"="file:///tmp/daily_scl_tests-rhel9-test/s2i-nodejs-container/test/fastify"
--> 1adfb0f719c
STEP 3/11: USER root

[snipped]

> fastify@4.17.0 test:typescript
> tsc test/types/import.ts && tsd


  test/types/type-provider.test-d.ts:114:4
  ✖  114:4   Parameter type number | undefined is not identical to argument type any.                            
  ✖  114:35  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  114:35  req.body is of type unknown.                                                                        
  ✖  115:4   Parameter type string | undefined is not identical to argument type any.                            
  ✖  115:35  req.body is of type unknown.                                                                        
  ✖  116:4   Parameter type boolean | undefined is not identical to argument type any.                           
  ✖  116:36  req.body is of type unknown.                                                                        
  ✖  141:4   Parameter type number | undefined is not identical to argument type any.                            
  ✖  141:35  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  141:35  req.body is of type unknown.                                                                        
  ✖  142:4   Parameter type string | undefined is not identical to argument type any.                            
  ✖  142:35  req.body is of type unknown.                                                                        
  ✖  143:4   Parameter type boolean | undefined is not identical to argument type any.                           
  ✖  143:36  req.body is of type unknown.                                                                        
  ✖  515:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  526:2   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  537:0   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  537:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  567:0   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  567:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  567:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  587:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  587:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  615:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  640:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  673:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  673:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  690:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  690:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  704:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  704:12  Type instantiation is excessively deep and possibly infinite.                                       

  31 errors

S2I image 'ubi9/nodejs-16:1' test FAILED (exit code: 1)
Test for image 'ubi9/nodejs-16:1' FAILED (exit code: 1)
@phracek
Copy link
Member Author

phracek commented May 25, 2023

This failure is also present on Fedora

@lholmquist
Copy link
Member

lholmquist commented May 25, 2023

@phracek i'll take a look

@lholmquist
Copy link
Member

i'm also seeing this locally on my mac. i'll investigate

@lholmquist
Copy link
Member

created an issue in the fastify repo: fastify/fastify#4769

@lholmquist
Copy link
Member

@phracek the dependecy that was causing the issue has been updated, so running the test suite now should be fine

@zmiklank
Copy link
Member

I can confirm. I ran tests for this PR #392 two days ago and the fastify testsuite passed.

@hhorak
Copy link
Member

hhorak commented Aug 21, 2023

I see the tests for the fastify fail again, with Node.js 18 and fastify versino 4.21.0 -- a containerized reproducer:

$ cat Containerfile 
FROM quay.io/fedora/s2i-core:36

RUN yum -y module enable nodejs:18 && yum -y install git nodejs nodejs-nodemon npm && yum clean all

RUN git clone --branch v4.21.0 https://github.com/fastify/fastify.git
RUN cd fastify && npm install fastify@4.21.0
RUN cd fastify && npm test

$ podman build .
...
    # Subtest: fastify instance should contains listeningOrigin property (IPv6)
        1..1
        not ok 1 - should be equivalent
          ---
          diff: |
            --- expected
            +++ actual
            @@ -1,1 +1,1 @@
            -"http://[::1]:3000"
            +"http://::1:3000"
          at:
            line: 169
            column: 5
            file: test/fastify-instance.test.js
            type: Test
          stack: |
            Test.<anonymous> (test/fastify-instance.test.js:169:5)
          source: |2
              await fastify.listen({ port, host })
              t.same(fastify.listeningOrigin, `http://[::1]:${port}`)
            ----^
              await fastify.close()
            })
          ...
        
        # failed 1 test
    not ok 13 - fastify instance should contains listeningOrigin property (IPv6) # time=176.571ms
    
    1..13
    # failed 1 of 13 tests
    # time=796.221ms
not ok 35 - test/fastify-instance.test.js # time=796.221ms
  ---
  env: {}
  file: test/fastify-instance.test.js
  timeout: 30000
  command: /usr/bin/node
  args:
    - --allow-natives-syntax
    - test/fastify-instance.test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /opt/app-root/src/fastify
  exitCode: 1
  ...
...
# failed 1 of 133 tests

@hhorak
Copy link
Member

hhorak commented Aug 21, 2023

@lholmquist Could you, please, take a look what is wrong this time? Is it possible that the test would only work on ipv6 network?

@lholmquist
Copy link
Member

@hhorak that could be what it is. I was able to reproduce your test failure. i only ran "node test/fastify-instance.test.js" to just run that one test file. I noticed that the code that is failing was added in v4.20.0, so i checked out v4.19.0 and that test file passed. i'm a little unfamiliar with the network stuff, so i'm not sure how to "turn on" ipv6

@lholmquist lholmquist removed their assignment May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants