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: Exceeded timeout of 5000ms for a test #946

Closed
joseluisq opened this issue Jul 4, 2018 · 10 comments
Closed

Jest: Exceeded timeout of 5000ms for a test #946

joseluisq opened this issue Jul 4, 2018 · 10 comments

Comments

@joseluisq
Copy link

joseluisq commented Jul 4, 2018

Due that Jest is automatic in Codesandbox. It would be great if you can provide the option to increase the timeout.

https://codesandbox.io/s/github/joseluisq/hyperapp-starter

Exceeded timeout of 5000ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.

Error: Exceeded timeout of 5000ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.
    at https://codesandbox.io/static/js/vendors~sandbox.4581c9c4.chunk.js:1:283345
    at https://codesandbox.io/static/js/vendors~sandbox.4581c9c4.chunk.js:1:283511
@nitin42
Copy link

nitin42 commented Jul 7, 2018

Hey! Few things -

  • I don't know how that example link is related to your problem because there are no test suites.

  • We can set a default timeout value in TestRunner. The default provided in Jest is 5 seconds. We can extend that.

  • Last thing, adding an option for changing timeouts frequently will cause a memory leak

@joseluisq
Copy link
Author

I don't know how that example link is related to your problem because there are no test suites.

I have updated the link:
https://codesandbox.io/s/github/joseluisq/hyperapp-starter

We can set a default timeout value in TestRunner. The default provided in Jest is 5 seconds. We can extend that.

How can we extend that?

Last thing, adding an option for changing timeouts frequently will cause a memory leak

What do you suggest?
Here you have the same app tested using Travis CI:
https://travis-ci.org/joseluisq/hyperapp-starter/jobs/401018541#L457

@nitin42
Copy link

nitin42 commented Jul 21, 2018

Give me a little bit of time to search into this and see if I can extend the default timeout value. If I succeed, then I am sure I'll able to resolve memory issue too.

@nitin42
Copy link

nitin42 commented Jul 22, 2018

Have you tried extending the timeout value using jest.setTimeout(value) inside your test file ?

@joseluisq
Copy link
Author

Have you tried extending the timeout value using jest.setTimeout(value) inside your test file ?

yes, It doesn't work

@SoleCincis
Copy link

my tests are running smoothly when I'm not in headless mode .
as soon as I try with headless i get this error:
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
increasing and decreasing the slowMo I understood that it needs to be faster then setTimeout .
but I still can't get rid of this error message .

@github-actions
Copy link

github-actions bot commented Sep 4, 2020

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

@github-actions github-actions bot added the stale label Sep 4, 2020
@github-actions
Copy link

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

@danlesko
Copy link

Was there ever any development on this?

@ocasta181
Copy link

seconded, this is a problem for tests including deployed smart contracts.

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

No branches or pull requests

7 participants