-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 global timeouts occur, show unfinished tests, not pending ones #2421
Comments
It'd be really useful to have the duration a test was running for along with this change. |
I've recently starting to see this a lot of the time I run all my tests:
I only have async tests, I guess some are taking longer than AVA allows? The thing is, even though all my tests are Should I open a new issue for this? When searching for related issues it brought me here. |
@mesqueeb note that with AVA 3, we've set a default inactivity timeout of 10 seconds. Before there was no default. It may be that you have too many concurrent tests and they're slowing each other down. Try using more test files, or using |
Perhaps this deserves a separate issue, but will log it here and move if that seems more appropriate. This is the console log I see:
What's happening is that one test file has a Seem it would probably be a good idea to track the before*/after* tasks in flight (in addition to the tests) and report them on timeout. |
@sramam to clarify, what are you expecting to see here? |
Just some indication that it's not the test itself, but which setup/teardown that timed-out. The output as presented above basically says there was a timeout, but everything passed. |
@sramam thanks. That makes sense. I've updated the issue summary to read:
|
Both due to the age of this issue, and the state of our reporters, I've decided to roll this into #2501. |
When a global timeout occurs, we currently print all pending tests, like here:
ava/lib/reporters/verbose.js
Line 163 in b6a46bd
The problem is that these tests have not necessarily started. For instance, if they're declared as
test.serial()
, or if they're non-asynchronoustest()
s.We should only print those tests and hooks that have started.
It may be the case that internally we're not yet tracking this, and there might be some false negatives if the timeout triggers before the starting can be communicated to the main process.
This is based on this discussion: #2384 (comment)
The text was updated successfully, but these errors were encountered: