mirror of https://github.com/m-labs/artiq.git
test/worker: always close even if prepare() raises
This commit is contained in:
parent
82a2beaa32
commit
d73006652b
|
@ -31,8 +31,8 @@ class WatchdogTimeoutInBuild(Experiment, AutoDB):
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _call_worker(worker, expid):
|
def _call_worker(worker, expid):
|
||||||
yield from worker.prepare(0, "main", expid, 0)
|
|
||||||
try:
|
try:
|
||||||
|
yield from worker.prepare(0, "main", expid, 0)
|
||||||
yield from worker.run()
|
yield from worker.run()
|
||||||
yield from worker.analyze()
|
yield from worker.analyze()
|
||||||
finally:
|
finally:
|
||||||
|
@ -58,7 +58,7 @@ def _run_experiment(experiment):
|
||||||
|
|
||||||
class WatchdogCase(unittest.TestCase):
|
class WatchdogCase(unittest.TestCase):
|
||||||
def test_watchdog_no_timeout(self):
|
def test_watchdog_no_timeout(self):
|
||||||
_run_experiment("WatchdogNoTimeout")
|
_run_experiment("WatchdogNoTimeout")
|
||||||
|
|
||||||
def test_watchdog_timeout(self):
|
def test_watchdog_timeout(self):
|
||||||
with self.assertRaises(WorkerWatchdogTimeout):
|
with self.assertRaises(WorkerWatchdogTimeout):
|
||||||
|
|
Loading…
Reference in New Issue