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

TAP output does not say which tests (or at least which file) failed after timeout #2612

Closed
tymfear opened this issue Nov 24, 2020 · 8 comments · Fixed by #2630
Closed

TAP output does not say which tests (or at least which file) failed after timeout #2612

tymfear opened this issue Nov 24, 2020 · 8 comments · Fixed by #2630
Labels
bug current functionality does not work as desired help wanted scope:reporters

Comments

@tymfear
Copy link
Contributor

tymfear commented Nov 24, 2020

So here is the output of timedout test report (there are passed tests as well).

# Exited because no new tests completed within the last 180000ms of inactivity
not ok 51 - Exited because no new tests completed within the last 180000ms of inactivity

It is impossible to figure out which test caused timeout.
Would be nice at least to narrow it down to test file, to understand where to start searching.

@novemberborn
Copy link
Member

Yea… I think this may be a bug when you don't use verbose mode. If you try with verbose mode does it work?

@tymfear
Copy link
Contributor Author

tymfear commented Nov 24, 2020

Well, I tried, but the output is completely the same - so either it doesn't work in verbose mode or --verbose doesn't work :)

@tymfear
Copy link
Contributor Author

tymfear commented Nov 24, 2020

So found in docs that verbose works if tap is not enabled - and tap is enabled. But, anyway, it doesn't show where it failed (or I missed something, chances are not zero )

@tymfear
Copy link
Contributor Author

tymfear commented Nov 24, 2020

@novemberborn would that be enough to change this
https://github.com/avajs/ava/blob/master/lib/reporters/tap.js#L174-L176

case 'timeout':
  this.writeCrash(evt, `Exited because no new tests completed within the last ${evt.period}ms of inactivity`);
  break;

to

case 'timeout':
  this.writeCrash(evt, `${evt.testFile} Exited because no new tests completed within the last ${evt.period}ms of inactivity`);
  break;

Or not so easy? 😂

@novemberborn
Copy link
Member

Whatever you think makes sense 😄

@novemberborn novemberborn added bug current functionality does not work as desired help wanted scope:reporters and removed needs triage labels Nov 25, 2020
@novemberborn novemberborn changed the title Report does not say which tests (or at least which file) failed with timeout TAP output does not say which tests (or at least which file) failed after timeout Nov 25, 2020
@tymfear
Copy link
Contributor Author

tymfear commented Nov 25, 2020

@novemberborn it's just I'm not that familiar with codebase and have no idea is that place correct - so was asking.

@novemberborn
Copy link
Member

@tymfear looking at the snippet that seems like a good guess. I don't really know the TAP format either.

@tymfear
Copy link
Contributor Author

tymfear commented Nov 25, 2020

@novemberborn - I'll try it out.
P.S. Just created another issue related to TAP reports generation, sorry

novemberborn pushed a commit that referenced this issue Dec 31, 2020
Fixes #2612 

Co-authored-by: Daudov, Tymur <tymur.daudov@f-secure.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug current functionality does not work as desired help wanted scope:reporters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants