avocado
avocado copied to clipboard
job-timeout not working with nrunner
Describe the bug
--job-timeout option is not working when using the new runner.
Steps to reproduce
$ cat /tmp/test.sh
#!/bin/bash
sleep 2
$ avocado run --job-timeout=1 /tmp/test.sh
JOB ID : a76b3d11917d2749f0126a9bc71ac63516caaae8
JOB LOG : /home/local/avocado/job-results/job-2022-03-25T15.36-a76b3d1/job.log
(1/1) /tmp/test.sh: STARTED
RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0 | CANCEL 0
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
concurrent.futures._base.CancelledError
JOB HTML : /home/local/avocado/job-results/job-2022-03-25T15.36-a76b3d1/results.html
JOB TIME : 1.76 s
Expected behavior
avocado run --test-runner='runner' --job-timeout=1 /tmp/test.sh
JOB ID : 1e009d0b2feec331b20e1f906eb868f426e1e7c0
JOB LOG : /home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0/job.log
(1/1) /tmp/test.sh: STARTED
\ (1/1) /tmp/test.sh: INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '1-/tmp/test.sh', 'logdir': '/home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0', 'logfile': '/home/local/avocado/job-results/job-2022-03-25T15.36... (1.09 s)
RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 1 | CANCEL 0
JOB HTML : /home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0/results.html
JOB TIME : 1.52 s
Current behavior Vide reproducible
System information (please complete the following information):
- OS: ```LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora release 34 (Thirty Four) Release: 34 Codename: ThirtyFour
- Avocado version: master
- Avocado installation method: github/venv
**Additional information**
Add any other information about the problem here. Test details can be added here.