forked from M-Labs/artiq
test_scheduler: fix asyncio event loop management
This commit is contained in:
parent
6cfd1480a7
commit
a96bbd8508
|
@ -104,7 +104,7 @@ class SchedulerCase(unittest.TestCase):
|
||||||
done.set()
|
done.set()
|
||||||
scheduler.notifier.publish = notify
|
scheduler.notifier.publish = notify
|
||||||
|
|
||||||
scheduler.start()
|
scheduler.start(loop)
|
||||||
|
|
||||||
# Verify that a timed experiment far in the future does not
|
# Verify that a timed experiment far in the future does not
|
||||||
# get run, even if it has high priority.
|
# get run, even if it has high priority.
|
||||||
|
@ -269,7 +269,7 @@ class SchedulerCase(unittest.TestCase):
|
||||||
done.set()
|
done.set()
|
||||||
scheduler.notifier.publish = notify
|
scheduler.notifier.publish = notify
|
||||||
|
|
||||||
scheduler.start()
|
scheduler.start(loop)
|
||||||
|
|
||||||
scheduler.submit("main", expid_bg, low_priority)
|
scheduler.submit("main", expid_bg, low_priority)
|
||||||
scheduler.submit("main", expid_empty, high_priority, late)
|
scheduler.submit("main", expid_empty, high_priority, late)
|
||||||
|
@ -328,7 +328,7 @@ class SchedulerCase(unittest.TestCase):
|
||||||
empty_completed.set()
|
empty_completed.set()
|
||||||
scheduler.notifier.publish = notify
|
scheduler.notifier.publish = notify
|
||||||
|
|
||||||
scheduler.start()
|
scheduler.start(loop)
|
||||||
scheduler.submit("main", expid_bg, -99, None, False)
|
scheduler.submit("main", expid_bg, -99, None, False)
|
||||||
loop.run_until_complete(background_running.wait())
|
loop.run_until_complete(background_running.wait())
|
||||||
self.assertFalse(scheduler.check_pause(0))
|
self.assertFalse(scheduler.check_pause(0))
|
||||||
|
@ -379,7 +379,7 @@ class SchedulerCase(unittest.TestCase):
|
||||||
empty_ready.set()
|
empty_ready.set()
|
||||||
scheduler.notifier.publish = notify
|
scheduler.notifier.publish = notify
|
||||||
|
|
||||||
scheduler.start()
|
scheduler.start(loop)
|
||||||
scheduler.submit("main", expid_bg, -99, None, False)
|
scheduler.submit("main", expid_bg, -99, None, False)
|
||||||
loop.run_until_complete(background_running.wait())
|
loop.run_until_complete(background_running.wait())
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ class SchedulerCase(unittest.TestCase):
|
||||||
done.set()
|
done.set()
|
||||||
scheduler.notifier.publish = notify
|
scheduler.notifier.publish = notify
|
||||||
|
|
||||||
scheduler.start()
|
scheduler.start(loop)
|
||||||
scheduler.submit("main", expid, 0, None, False)
|
scheduler.submit("main", expid, 0, None, False)
|
||||||
loop.run_until_complete(first_preparing.wait())
|
loop.run_until_complete(first_preparing.wait())
|
||||||
scheduler.submit("main", expid, 1, None, True)
|
scheduler.submit("main", expid, 1, None, True)
|
||||||
|
|
Loading…
Reference in New Issue