Commit e776ef4c authored by Matias Guijarro's avatar Matias Guijarro
Browse files

Merge branch 'robustness-on-test_exception_in_reading' into 'master'

CI: Robustness on test_exception_in_reading

Closes #2829

See merge request !3812
parents 7ebdf3c5 4ba24fe5
Pipeline #49036 passed with stages
in 103 minutes and 34 seconds
......@@ -13,6 +13,7 @@ from import Sequence
def test_exception_in_reading(session):
"""Check that exception during controller `read` is catched at scan run"""
event = gevent.event.Event()
class CntController(SamplingCounterController):
......@@ -38,14 +39,11 @@ def test_exception_in_reading(session):
c = Cnt(10)
s = scans.timescan(0, c, npoints=10, save=False, run=False)
with gevent.Timeout(1):
except RuntimeError:
if not event.is_set():
except gevent.Timeout:
assert False
with pytest.raises(RuntimeError):
if not event.is_set():
assert False, "RuntimeError was not raised from the right place"
assert s.state == ScanState.KILLED
assert["state"] == ScanState.KILLED
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment