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

Jest - The integration fails when running tests concurrently #147

Closed
pritishGalway opened this issue Jul 25, 2024 · 8 comments
Closed

Jest - The integration fails when running tests concurrently #147

pritishGalway opened this issue Jul 25, 2024 · 8 comments

Comments

@pritishGalway
Copy link

pritishGalway commented Jul 25, 2024

Hello,

Seeing the following error when the jest tests are run concurrently.

2024-07-17T10:44:49.6007981Z Error: Item with tempId "405gzmgklypptxtq" not found
2024-07-17T10:44:49.6012705Z     at RPClient.finishTestItem (/__w/qe-api-integration/qe-api-integration/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:589:9)
2024-07-17T10:44:49.6019481Z     at JestReportPortal._finishPassedStep (/__w/qe-api-integration/qe-api-integration/node_modules/@reportportal/agent-js-jest/src/reporter.js:218:37)
2024-07-17T10:44:49.6025718Z     at JestReportPortal._finishStep (/__w/qe-api-integration/qe-api-integration/node_modules/@reportportal/agent-js-jest/src/reporter.js:206:14)
2024-07-17T10:44:49.6032194Z     at JestReportPortal.onTestCaseResult (/__w/qe-api-integration/qe-api-integration/node_modules/@reportportal/agent-js-jest/src/reporter.js:79:10)
2024-07-17T10:44:49.6038766Z     at ReporterDispatcher.onTestCaseResult (/__w/qe-api-integration/qe-api-integration/node_modules/@jest/core/build/ReporterDispatcher.js:64:24)
2024-07-17T10:44:49.6044478Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The error resolves when running the tests serially using --detectOpenHandles, -i or --runInBand options.

Current versions:

"@reportportal/agent-js-jest": "^5.1.0"
"jest": "^29.7.0"

The issue could be a duplicate of #146
However, the error is happening at a different place in code for them.

@pritishGalway pritishGalway changed the title Jest - The integration fails on when running tests concurrently Jest - The integration fails when running tests concurrently Jul 25, 2024
@aviadhadidainx
Copy link

It is not supported based yet on the docs:
image

@pritishGalway
Copy link
Author

We are not using test.concurrent which I believe runs tests concurrently within the same test file. In our case, in the default setting, test files are run concurrently.

@lucas-delafuente-deel
Copy link

Hi team!
We have the same issue 🥲 and we are using the same version as you.
Additionally, I think this error causes our executions to never finish in report portal and remain running.

Any idea about a solution 🙏 ?

@makasinod
Copy link

makasinod commented Sep 11, 2024

Hi team!
We have the same issue for "@reportportal/agent-js-jest": "^5.1.0"/"jest": "^29.7.0"
For "@reportportal/agent-js-jest": "5.0.8" it works fine.
Is there any updates?

@lucas-delafuente-deel
Copy link

Hi team!
We have the same issue 🥲 and we are using the same version as you.
Additionally, I think this error causes our executions to never finish in report portal and remain running.

Any idea about a solution 🙏 ?

@tristanzander
Copy link
Contributor

tristanzander commented Oct 24, 2024

I ran into these issues as well. I believe I may have resolved it in #148 by removing usage of this.tempStepId where possible. It seems as though the ReportingApi may still have the potential to send the attachments to the wrong test case without using a more fool-proof way of tracking the current running test.

@lucas-delafuente-deel
Copy link

Woow, that is amazing, thank you! I will keep my eyes on that PR.

@AmsterGet
Copy link
Member

Fixed in v5.1.1.
Huge thanks, @tristanzander !

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

No branches or pull requests

6 participants