forked from M-Labs/artiq
1
0
Fork 0

test/worker: adapt to new scheduler API

This commit is contained in:
Sebastien Bourdeauducq 2015-05-21 16:41:45 +08:00
parent a670b9f660
commit 785623be26
1 changed files with 4 additions and 4 deletions

View File

@ -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):