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

Failing tests on node 18.x #431

Open
victorb-tsn opened this issue Mar 22, 2023 · 3 comments
Open

Failing tests on node 18.x #431

victorb-tsn opened this issue Mar 22, 2023 · 3 comments
Labels

Comments

@victorb-tsn
Copy link

The provided tests in the example repo are failing on Node 18, due to a jasmine timeout error.
Steps to reproduce:

  • Checkout the repository
  • Setup node 18.x
  • Run tests -> npm run test
➜  parse-server-example git:(master) ✗ git --no-pager  log --oneline -n 1 && node -v && npm -v && npm run test
2d072a6 (HEAD -> master, origin/master, origin/HEAD) docs: update README (#419)
v18.12.1
8.19.2

> [email protected] test
> mongodb-runner start && jasmine

  ◝ Starting a MongoDB deployment to test against...DATABASE_URI not specified, falling back to localhost.
Started
warn: DeprecationWarning: The Parse Server option 'directAccess' default will change to 'true' in a future version. Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one.
warn: DeprecationWarning: The Parse Server option 'enforcePrivateUsers' default will change to 'true' in a future version.
..F..

Failures:
1) Parse Server example failing test
  Message:
    Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
  Stack:
        at <Jasmine>
        at listOnTimeout (node:internal/timers:564:17)
        at process.processTimers (node:internal/timers:507:7)

Suite error: top suite
  Message:
    Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
  Stack:
        at <Jasmine>
        at listOnTimeout (node:internal/timers:564:17)
        at process.processTimers (node:internal/timers:507:7)

5 specs, 2 failures
Finished in 11.087 seconds
➜  parse-server-example git:(master) ✗

@parse-github-assistant
Copy link

Thanks for opening this issue!

@dblythy
Copy link
Member

dblythy commented Mar 22, 2023

Change the test command to;

NODE_OPTIONS=--dns-result-order=ipv4first jasmine

or change database uri to ipv6

@victorb-tsn
Copy link
Author

Thanks for the reply. I update the test command so the the ipv4 is used and test command executed successfully.
Based on the fix, would this be an issue with jasmine or a more general one related to how the dns resolvers are used by Node ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants