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

Tests are consistently failing and deployment is failing #466

Closed
3rdvision opened this issue Jan 18, 2023 · 2 comments
Closed

Tests are consistently failing and deployment is failing #466

3rdvision opened this issue Jan 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working p-low Low priority issue

Comments

@3rdvision
Copy link
Contributor

3rdvision commented Jan 18, 2023

Description

The npm run test step of the deployment is consistently failing in the same step and is not related to the deployment.

The error log is the following:

  1) ConfigAPI
       #configResolveSku()
         should resolve SKU:
     Uncaught TypeError: Cannot read property 'body' of null
      at /__w/ripe-sdk/ripe-sdk/node_modules/node-fetch/lib/index.js:1519:27
      at IncomingMessage.<anonymous> (node_modules/node-fetch/lib/index.js:1749:6)
      at IncomingMessage.<anonymous> (_http_client.js:389:14)
      at endReadableNT (_stream_readable.js:1241:12)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)

  2) ConfigAPI
       #configResolveSku()
         should resolve SKU:
     Error: done() called multiple times in test <ConfigAPI #configResolveSku() should resolve SKU> of file /__w/ripe-sdk/ripe-sdk/test/js/api/config.js
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)



[12:00:20] 'test' errored after 2.78 min
[12:00:20] Error in plugin "gulp-mocha"

After an in-depth inspection the error is caused because of the race condition to delete the SKU at https://github.com/ripe-tech/ripe-sdk/blob/master/test/js/api/config.js#L199

This implementation of Promise will run after the test block is complete and call done a little bit after the previous requests are also complete which means done() will be called 2 times and thus the error "done() called multiple times".

This is not reproducible locally which means that is impacted by the network and processing speed - because the workflows are run on a low tier container it always reproduces.

Expected vs. Observed

- -
Expected The tests pass.
Observed The tests fail.

Repro Steps

  1. Run yarn && yarn build && yarn test
  2. See tests failing
@3rdvision 3rdvision added bug Something isn't working triage Issue currently under triage labels Jan 18, 2023
@ripe-tobias-bot
Copy link

Woof, Woof!

Thank you @3rdvision for submitting the "Tests are consistently failing and deployment is failing" issue 😎.

Please do not forget to review our internal guidelines:

  • Describe the problem in the best possible way
  • Include at least the Description section, but considered adding other sections
  • Avoid suggesting immediate solutions, think deeply about the problem
  • Engage in the Triage process being as responsive as possible
  • Understand and accept the possibly large amount of execution time
  • Avoid immediate reallocation of the issue, let triage do their job

Engaging in the development process in the best possible way helps it being efficient and fast.

Your friend,
Tobias (Platforme's mascot)

Tobias Bot

joao-conde added a commit that referenced this issue Jan 18, 2023
@hugo-gomes hugo-gomes added p-low Low priority issue and removed triage Issue currently under triage labels Jan 18, 2023
@hugo-gomes hugo-gomes assigned 3rdvision and unassigned hugo-gomes Jan 18, 2023
@3rdvision
Copy link
Contributor Author

Closing this as this specific error is no longer occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p-low Low priority issue
Projects
None yet
Development

No branches or pull requests

2 participants