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
Allow clues to be added to timeouts #2230
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This has just recently been referred to, so I believe it should stay open. |
It's in the roadmap. I've marked it as pinned. |
How do you see this working? |
See above (at the example of a CLI program that causes a timeout due to waiting for stdin): "In such cases stdout could be shown as a clue, which would help to identify the interactive prompt." |
Right, so this is specific to stdin in timeouts. I wonder if another construct makes sense. withStdOutClue { } Which captures std out and emits it as a clue if the test fails. |
I wasn't meaning to suggest such a specific change to be done to Kotest. But as some one who writes test with Kotest, I'd like to be able to "manually" pass any clue that I see fit to |
ohhh I see. Right, that sounds like a really good idea. |
You can now next withTimeout inside a withClue, withClue("timey timey") {
withTimeout(2) {
delay(1000)
}
} |
It would be nice if there was a way to also give a clue when a timeout occurs (configured either via
withTimeout()
or the test configuration). A use-case would be tests that call external programs. Such programs might run interactive prompts, blocking the test, which then runs into a timeout. In such cases stdout could be shown as a clue, which would help to identify the interactive prompt.The text was updated successfully, but these errors were encountered: