Skip to content

--test-suite-timeout-grace#6868

Merged
mpilgrem merged 4 commits intomasterfrom
test-suite-timeout-grace
Apr 5, 2026
Merged

--test-suite-timeout-grace#6868
mpilgrem merged 4 commits intomasterfrom
test-suite-timeout-grace

Conversation

@DanBurton
Copy link
Copy Markdown
Contributor

(I'm PR-ing against master because stable is behind it)

  • Any changes that could be relevant to users have been recorded in ChangeLog.md.
  • The documentation has been updated, if necessary

Implements #6867 by adding --test-suite-timeout-grace (and test-suite-timeout-grace config) to support staged test timeout termination: SIGTERM -> graceful stop -> SIGKILL if still running.

Kept backward compatibility when grace is not set, updated docs, added flag & corresponding config.

See the new integration test for an example of what this option accomplishes. Test passes as expected on my MacOS device. I put in a placebo on Windows b/c I'm not sure how it translates there.

@mpilgrem
Copy link
Copy Markdown
Member

mpilgrem commented Apr 4, 2026

@DanBurton, thanks! PRing against master is correct - changes to the stable branch relate only to corrections to the online documentation for the most-recently released version of Stack.

@mpilgrem
Copy link
Copy Markdown
Member

mpilgrem commented Apr 4, 2026

@DanBurton, in parallel, I have fixed the 'bug' that the existing --test-suite-timeout option of Stack 3.9.3 is not documented online. Please can you rebase against master.

@DanBurton DanBurton force-pushed the test-suite-timeout-grace branch from 0ff2585 to 0e8e6a8 Compare April 4, 2026 21:45
@DanBurton
Copy link
Copy Markdown
Contributor Author

@DanBurton, in parallel, I have fixed the 'bug' that the existing --test-suite-timeout option of Stack 3.9.3 is not documented online. Please can you rebase against master.

Done. I also fixed the stan ignore lines for files I changed.

@DanBurton
Copy link
Copy Markdown
Contributor Author

The failed integration tests are definitely identifying a problem on some platforms (specifically the test I added is failing). It's unclear to me whether my code made the situation worse on those platforms, or whether it simply failed to make the situation better. Not sure how to proceed but I'm surprised the macos tests failed when it passes locally on my macos device.

$ stack build --flag stack:integration-tests stack --exec "stack-integration-test -m 6867-timeout-grace"
...
Running integration test 1/1: 6867-timeout-grace
Success!
Integration tests ran in : 0:0:6 - total 6 seconds
Successful tests:
- 6867-timeout-grace

No failures!

Hm, the fact that it ran in a total 6 seconds is suspicious though since the whole point is that on a successful run it should be killed sooner.

@DanBurton
Copy link
Copy Markdown
Contributor Author

Actually it may be that I just underestimated the stack time overhead, and in the CI containers it's slow enough to cause a false failure. I didn't want to bog down the integration tests with a longer wait but perhaps it's needed in this case?

@DanBurton
Copy link
Copy Markdown
Contributor Author

Actually it may be that I just underestimated the stack time overhead, and in the CI containers it's slow enough to cause a false failure. I didn't want to bog down the integration tests with a longer wait but perhaps it's needed in this case?

Added a pre-build step to the integration test, it seems to pass consistently now without increasing the time expectations.

@mpilgrem mpilgrem merged commit 5fd5a48 into master Apr 5, 2026
13 checks passed
@mpilgrem mpilgrem deleted the test-suite-timeout-grace branch April 5, 2026 19:33
@mpilgrem
Copy link
Copy Markdown
Member

mpilgrem commented Apr 5, 2026

@DanBurton, looks good to me!

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

Successfully merging this pull request may close these issues.

2 participants