avocado
avocado copied to clipboard
Block timeout introduction
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: #5994