Replies: 5 comments 4 replies
-
|
There is currently no timeout feature, but it is an acceptable feature. However, I would like to know why we want this feature. I believe there are two use cases for timeouts. One is to prevent stopping the whole tests due to infinite loops and other bugs. A timeout for this would be necessary. The other is a test to guarantee that the command/function will finish within a specified time. It seems that many testing frameworks have the ability to specify a timeout for each test, but, if my thought is correct, I think few people want this. Both of these features are acceptable, but I'd like to target the first use case. and I'll think about the second use case after people who need it show up. |
Beta Was this translation helpful? Give feedback.
-
|
AI suggest this way: Use ShellSpec's interception mechanism to automatically wrap all in |
Beta Was this translation helpful? Give feedback.
-
|
@LukeSavefrogs in short it does not work as expected. required a proper shellspec patching. claude code is working on it now |
Beta Was this translation helpful? Give feedback.
-
|
timeouts implementation: #356 How to Manually Apply the Timeout FeatureIf you need to use the timeout feature before the official release (v0.29.0) is merged, you can apply it as a patch to your existing ShellSpec installation. Prerequisites
Instructions
Potential ConflictsWhen applying the patch to version 0.28.1 (or earlier), you may see warnings about Expected/Harmless RejectionsThe following files may fail to patch cleanly, but these failures are generally harmless for the functionality of the timeout feature:
How to Fix RejectionsIf critical logic fails to apply:
Rolling BackTo revert the changes: patch -R -p1 < shellspec-timeout.patch
rm shellspec-timeout.patch |
Beta Was this translation helpful? Give feedback.
-
|
@LukeSavefrogs done, available for testing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Do you plan to implement timeout in tests?
I want to abort when a test does not finish within a specified time-limit.
Like the phpunit option
--default-time-limit.Let me know if there is a better way.
Beta Was this translation helpful? Give feedback.
All reactions