reportportal / agent-js-jest

Agent to integrate Jest with ReportPortal.
https://www.npmjs.com/package/@reportportal/agent-js-jest
Apache License 2.0
21 stars 36 forks source link

Fix URL - use /api/v1 instead of /api/v2 #143

Closed maks-rafalko closed 4 months ago

maks-rafalko commented 4 months ago

If I use /api/v2 as stated in documentation, I get the following error:

Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

With /api/v1 everything works as expected.

Please note that in the examples repository, /api/v1 is used:

https://github.com/reportportal/examples-js/blob/d9c8669cd5d36e357ae4d1e0e9136b4ea4777045/example-jest/jest.config.js#L10

AmsterGet commented 4 months ago

Hello @maks-rafalko ! Thanks for your PR. Do you see any errors on API service side that may cause such a long processing of requests? We've recently updated the base URL in readme to v2 as the requests within it are processed asynchronous on API side that means the higher throughput. It would be helpful to understand this behavior on API service side in your case.

maks-rafalko commented 4 months ago

I didn't notice anything, but if you can advice anything I can test - I will try to help. I've installed RP locally using docker compose, so probably I can enable debug and see the logs?

AmsterGet commented 4 months ago

What is your ReportPortal version? I also need to consult with my colleagues. @irynakozak2, @hlebkanonik do you have any idea why the API service can be slowed down within v2 endpoints? What info can we request here to investigate?

@maks-rafalko in the meantime, just in case, let's revert to v1 in docs as a default one.

maks-rafalko commented 4 months ago

What is your ReportPortal version?

If I understand it correctly, it's 5.11.1.

I downloaded this docker compose file (https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml) and use it with docker compose up ... - that's all what I do.

And then, I configured Jest reporter as shown in this repository. So it's pretty simple to reproduce the issue.