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

Ctrl+C/SIGINT interacts poorly with retry and fail-fast #1763

Open
timreinkeaxios opened this issue Sep 9, 2024 · 2 comments
Open

Ctrl+C/SIGINT interacts poorly with retry and fail-fast #1763

timreinkeaxios opened this issue Sep 9, 2024 · 2 comments

Comments

@timreinkeaxios
Copy link

👓 What did you see?

Ctrl+C sends INT which sets wants_to_quit. But, rather than exiting as soon as possible, cucumber will continue to retry.

Further, when --retry is combined with --fail-fast and interrupted, cucumber fails to exit entirely if a retry passes because fail fast sets wants_to_quit = false on success

Sending the second INT does exit immediately, but for dealing with cleanup/teardown in CI, it would be better to have a single INT work properly.

✅ What did you expect to see?

Tests should not retry after interrupt, and should always exit after current scenario.

📦 Which tool/library version are you using?

cucumber-9.2.0

🔬 How could we reproduce it?

Made a quick demo here:
https://github.com/timreinkeaxios/cucumber-int-demo

📚 Any additional context?

No response

@luke-hill
Copy link
Contributor

The code in question for the SIGINT was written well before both retry and fail-fast and as such what you're likely describing is just nuances.

I can quickly replicate what you're observing. However when you say tests should not retry, are you therefore suggesting that a single Ctrl+C should kill everything immediately? Just so I'm clear @timreinkeaxios

@timreinkeaxios
Copy link
Author

yeah, this is definitely some edge case stuff and probably not super important

However when you say tests should not retry, are you therefore suggesting that a single Ctrl+C should kill everything immediately

Not exactly - test code/environment might want a chance to clean up resources (e.g. in our case releasing selenium grid browser sessions). IDK what the best way to provide that as an API is - the After hook still runs after the test is interrupted, which is what I would want to happen for resource cleanup. That's probably ideal vs force killing the process

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

No branches or pull requests

2 participants