-
Notifications
You must be signed in to change notification settings - Fork 343
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
Multiple timeouts within a test #5994
Labels
Comments
richtja
moved this from Short Term (Current Q) Backlog
to In progress
in Default project
Sep 12, 2024
richtja
added a commit
to richtja/avocado
that referenced
this issue
Sep 17, 2024
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this: whit wait_max(3): #code which should take max 3 seconds ... The `wait_max` method will send `SIGALRM` if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout. Reference: avocado-framework#5994 Signed-off-by: Jan Richter <[email protected]>
richtja
added a commit
to richtja/avocado
that referenced
this issue
Sep 17, 2024
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this: with self.wait_max(3): #code which should take max 3 seconds ... The `wait_max` method will send `SIGALRM` if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout. Reference: avocado-framework#5994 Signed-off-by: Jan Richter <[email protected]>
richtja
added a commit
to richtja/avocado
that referenced
this issue
Sep 18, 2024
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this: with self.wait_max(3): #code which should take max 3 seconds ... The `wait_max` method will send `SIGTERM` if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout. Reference: avocado-framework#5994 Signed-off-by: Jan Richter <[email protected]>
richtja
added a commit
to richtja/avocado
that referenced
this issue
Sep 18, 2024
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this: with self.wait_max(3): #code which should take max 3 seconds ... The `wait_max` method will send `SIGTERM` if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout. Reference: avocado-framework#5994 Signed-off-by: Jan Richter <[email protected]>
richtja
added a commit
to richtja/avocado
that referenced
this issue
Oct 2, 2024
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this: with self.wait_max(3): #code which should take max 3 seconds ... The `wait_max` method will send `SIGTERM` if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout. Reference: avocado-framework#5994 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
Is your feature request related to a problem? Please describe.
On more complex (and thus usually) longer tests, there may be multiple steps to complete. It may be known that some of these steps should not take more than a small percentage of the overall expected time for the test as whole. Example:
In the current situation, with a single
TIMEOUT
per test,generate_entropy()
could take 20 times longer before the test is considered timed out.Describe the solution you'd like
Support for defining timeouts for different parts of the test, such as:
The
wait_max()
context manager would raise an exception ifgenerate_entropy()
takes longer than 5 seconds. This exception should be treated by the runner so that the test ends with a properINTERRUPTED
status and a description of where it timed out.Additional information
This feature is being proposed based on the discussions and requirements defined in https://gitlab.com/avocado-framework/dovetail/-/issues/4
The text was updated successfully, but these errors were encountered: