cucumber / cucumber/cucumber-ruby

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

Open
#1,763 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
5.2k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
3

Description

### 👓 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](https://github.com/cucumber/cucumber-ruby/blob/66834b2d84a845a61621d56cd60fd154983ec9fd/lib/cucumber/formatter/fail_fast.rb#L16-L18)

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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.