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

Remove "Timed out retrying after **ms" from test error messages when command timeout is set to zero #28720

Open
juan-belmonte opened this issue Jan 15, 2024 · 2 comments
Labels
type: enhancement Requested enhancement of existing feature type: error message

Comments

@juan-belmonte
Copy link

What would you like?

I'd like that Cypress outputs a retry-agnostic error message when retries are disabled by setting defaultCommandTimeout to 0 — or any other scoped timeout-related setting to disable retries.

Having a conditional error message to display the "Timed out retrying after ***ms" prefix only when retries are in place:

  • If retries are in place: Timed out retrying after ***ms: expected [...]
  • Otherwise: expected [...]

Why is this needed?

Considering we use Cypress to implement end-to-end tests of our REST API, it's confusing for stakeholders to read timeout-related messages.
API responses are not expected to change, thus the defaultCommandTimeout: 0 setting.

Other

No response

@jennifer-shehane jennifer-shehane added type: enhancement Requested enhancement of existing feature type: error message labels Jan 17, 2024
@emilyrohrbough
Copy link
Member

@juan-belmonte This error is created here:

const prependMsg = error?.retry === false ? '' : errByPath('miscellaneous.retry_timed_out', {
ms: options._runnableTimeout,
}).message

A simple check to verify the options._runnableTimeout is greater than 0 would satisfy this request. Interested in a contribution?

@juan-belmonte
Copy link
Author

Hi @emilyrohrbough. I'm more than interested, yes.

As you mentioned, the change is quite easy, but I struggle to find the existing test suite covering the driver's retries.ts code. Could you point me in the right direction, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Requested enhancement of existing feature type: error message
Projects
None yet
Development

No branches or pull requests

3 participants