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

Print pending tests when interrupting AVA, or after a timeout #583

Closed
novemberborn opened this issue Mar 1, 2016 · 20 comments · Fixed by #1886
Closed

Print pending tests when interrupting AVA, or after a timeout #583

novemberborn opened this issue Mar 1, 2016 · 20 comments · Fixed by #1886
Labels

Comments

@novemberborn
Copy link
Member

novemberborn commented Mar 1, 2016

Issuehunt badges

If you interrupt AVA (Ctrl+C/SIGTERM) while tests are still pending, AVA should print those tests before exiting. Similarly it should print pending tests when --timeout is reached.

This should help debug which tests are taking too long.

Related to #171.

dflupu earned $80.00 by resolving this issue!

@vadimdemedes
Copy link
Contributor

Great idea!

@sindresorhus
Copy link
Member

👍

@radiovisual
Copy link

This would be awesome. 👍

@novemberborn novemberborn changed the title Print pending tests when interrupting AVA Print pending tests when interrupting AVA, or after a timeout Sep 23, 2016
@sindresorhus
Copy link
Member

Would be really useful to use why-is-node-running to also show why tests are still pending.

@QuotableWater7
Copy link

Just curious, has there been any movement on this issue?

cc: @novemberborn

@novemberborn
Copy link
Member Author

@QuotableWater7 nope. Are you interested in taking this on?

@austinkelleher
Copy link

This would be tremendously useful. Is this still something that is planned @novemberborn?

@novemberborn
Copy link
Member Author

@austinkelleher most definitely. Would you want to give it a go?

@ace-n
Copy link

ace-n commented Nov 19, 2017

Ran into this problem myself - gonna try hacking something together if y'all don't mind. 🙂

@novemberborn
Copy link
Member Author

This will be easier to implement now that #1722 has landed, though perhaps we should implement it in the reporters, in which case it'd be better to wait for #1776.

@vancouverwill
Copy link
Contributor

vancouverwill commented Jul 24, 2018

any update on this now #1722 is merged ? Would be very useful 😄

@novemberborn
Copy link
Member Author

@vancouverwill I haven't had much time to work on #1776. I do think it should be implemented in the reporters, but I'm happy with some duplication if that unblocks.

Would you be interested in working on this?

@vancouverwill
Copy link
Contributor

@novemberborn hey yeah I would be interested, could you possibly give me some guidelines in terms of code style you would Iike or any goals with it? Thanks

@novemberborn
Copy link
Member Author

@vancouverwill we use XO for code style.

The reporters should receive events when tests are declared and when they finish, so it'll be possible to keep a list of pending tests (and test files, too). Then in lib/cli there should be a hook for SIGINT & SIGTERM to make the reporters stop listening to incoming events and shut down the workers, and then print the pending tests & test files. The same for --timeout handling.

At least that's the theory, it may be a bit different in practice 😄

@vancouverwill
Copy link
Contributor

great, i've started to take a look at it, busy with the day job but hopefully I can get more time on the wk 😄

@vancouverwill
Copy link
Contributor

can you assign me so no one else ends up having to create duplicate/wasted work?

novemberborn pushed a commit that referenced this issue Sep 15, 2018
In `--verbose` mode, print tests that were pending when a timeout occurs. See also #583.
@novemberborn
Copy link
Member Author

#1886 implements this for timeouts, in the --verbose logger.

We still want to implement this for when the process is interrupted ("killed"), and in the default mini reporter too.

Thank you @vancouverwill for getting us this far!

@novemberborn novemberborn reopened this Sep 15, 2018
@IssueHuntBot
Copy link

@issuehuntfest has funded $80.00 to this issue. See it on IssueHunt

@IssueHuntBot
Copy link

@dflupu has submitted a pull request. See it on IssueHunt

@IssueHuntBot
Copy link

@sindresorhus has rewarded $72.00 to @dflupu. See it on IssueHunt

  • 💰 Total deposit: $80.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $8.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants