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
when running vitest(using react-testing-library-dom) in git action, action exceeded the maximum execution time of xx minutes #1299
Comments
Uh oh! @JayKim88, the image you shared is missing helpful alt text. Check your issue body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Hi @JayKim88, thanks for opening this. Can you please share a minimal reproduction of this issue using our template? Thanks. |
@MatanBobi Thank you for your reply. The error takes place in git action when i try to push a PR(But locally, it works well.), thus, by using the template as you kindly suggested, can I make reproduction of git action as well? Or is it enough for you to get a part of codes like below? also i'm able to provide you with a short video showing the error. ...
on:
pull_request:
branches:
- staging
...
jobs:
check_and_test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
...
- name: Codegen and check type and test code
run: |
export NODE_OPTIONS="--max-old-space-size=4096"
pnpm i --frozen-lockfile
pnpm tsc --noEmit
pnpm test run // this is
pnpm codegen Thank you..! |
You can create a repo based on the template I've added and define the github action there :) |
okay..! Will create one and share accordingly~. |
@MatanBobi I've tried and realized that I cannot apply the complexity of our product's code to the demo thus impossible to reproduce the error. |
Unfortunately, without a proper reproduction we won't be able to investigate and try to assist here. |
@testing-library/dom
version: ^9.3.1Relevant code or config:
What you did:
In git action, it fails with the comment as
"The job running on runner GitHub Actions XX has exceeded the maximum execution time of XX minutes."
As shown in the reproduction image, after combineOrders.test.tsx is passed, and it is stuck in the next test spending the whole test time ending up with test fail.
After testing this, I found that this error occurs in case that test tries to find a element by synchronous method such as getByText, getBy-. In local environment, it occurs error as intended if not found.
If I replace these methods with asynchronous method like findby-, it works well locally and in git action.
What happened:
Reproduction:
Problem description:
Explained in What you did.
Suggested solution:
I haven't found a solution for it.
Are there anybody who experienced this case ?
I hope to know why this happens and how to fix it accordingly.
I expect it must make error and fail as soon as it's impossible to find a target element.
Thank you all !
(By any chance, if it should be posted as Support Question, please let me know🙏)
The text was updated successfully, but these errors were encountered: