forked from M-Labs/artiq
test/worker: adapt to new scheduler API
This commit is contained in:
parent
a670b9f660
commit
785623be26
|
@ -30,8 +30,8 @@ class WatchdogTimeoutInBuild(Experiment, AutoDB):
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _call_worker(worker, run_params):
|
def _call_worker(worker, expid):
|
||||||
yield from worker.prepare(0, run_params)
|
yield from worker.prepare(0, "main", expid)
|
||||||
try:
|
try:
|
||||||
yield from worker.run()
|
yield from worker.run()
|
||||||
yield from worker.analyze()
|
yield from worker.analyze()
|
||||||
|
@ -40,7 +40,7 @@ def _call_worker(worker, run_params):
|
||||||
|
|
||||||
|
|
||||||
def _run_experiment(experiment):
|
def _run_experiment(experiment):
|
||||||
run_params = {
|
expid = {
|
||||||
"file": sys.modules[__name__].__file__,
|
"file": sys.modules[__name__].__file__,
|
||||||
"experiment": experiment,
|
"experiment": experiment,
|
||||||
"arguments": dict()
|
"arguments": dict()
|
||||||
|
@ -51,7 +51,7 @@ def _run_experiment(experiment):
|
||||||
|
|
||||||
worker = Worker(handlers)
|
worker = Worker(handlers)
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.run_until_complete(_call_worker(worker, run_params))
|
loop.run_until_complete(_call_worker(worker, expid))
|
||||||
|
|
||||||
|
|
||||||
class WatchdogCase(unittest.TestCase):
|
class WatchdogCase(unittest.TestCase):
|
||||||
|
|
Loading…
Reference in New Issue