-
Notifications
You must be signed in to change notification settings - Fork 344
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
Exception handling causes test timeouts issues #6046
Comments
The
|
richtja
moved this from Short Term (Current Q) Backlog
to In progress
in Default project
Oct 31, 2024
richtja
added a commit
to richtja/avocado
that referenced
this issue
Oct 31, 2024
This commit changes the way how avocado instrumented runner handles test timeouts. For timeout handling, we used to use signals and raising TestInterrupt error. Such solution has an issue that we can't control where in the code the Error will be raised, and it can be handled before it reaches the runner layer. More info about this issue in avocado-framework#6046. This change removes the signal handling and uses threading instead. Now each test method will be run in a separated thread and this thread will be terminated if timeout is reached. This solution selves the raising error issue and keeps the current test lifecycle untouched. Reference: avocado-framework#6046 Signed-off-by: Jan Richter <[email protected]>
richtja
added a commit
to richtja/avocado
that referenced
this issue
Oct 31, 2024
This commit changes the way how avocado instrumented runner handles test timeouts. For timeout handling, we used to use signals and raising TestInterrupt error. Such solution has an issue that we can't control where in the code the Error will be raised, and it can be handled before it reaches the runner layer. More info about this issue in avocado-framework#6046. This change removes the signal handling and uses threading instead. Now each test method will be run in a separated thread and this thread will be terminated if timeout is reached. This solution selves the raising error issue and keeps the current test lifecycle untouched. Reference: avocado-framework#6046 Signed-off-by: Jan Richter <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Avocado uses
TestInterrupt
exceptions for interrupting tests on timeouts. Unfortunately, users might change this behaviour if they will add exception handling forException
class. This will cause that tests won't end properly on timeout.Steps to reproduce
Small change in timeouttests.py from avocado examples can work as reproducer.
Expected behavior
Current behavior
You can see that the test was interrupted based on timeout, but the overall result is
PASS
.The text was updated successfully, but these errors were encountered: