From a96bbd8508dcfd0777b518131bd7f2ad85d1b20d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 10 Jan 2023 12:30:08 +0800 Subject: [PATCH] test_scheduler: fix asyncio event loop management --- artiq/test/test_scheduler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/artiq/test/test_scheduler.py b/artiq/test/test_scheduler.py index 854f17a93..5ed6cc01a 100644 --- a/artiq/test/test_scheduler.py +++ b/artiq/test/test_scheduler.py @@ -104,7 +104,7 @@ class SchedulerCase(unittest.TestCase): done.set() scheduler.notifier.publish = notify - scheduler.start() + scheduler.start(loop) # Verify that a timed experiment far in the future does not # get run, even if it has high priority. @@ -269,7 +269,7 @@ class SchedulerCase(unittest.TestCase): done.set() scheduler.notifier.publish = notify - scheduler.start() + scheduler.start(loop) scheduler.submit("main", expid_bg, low_priority) scheduler.submit("main", expid_empty, high_priority, late) @@ -328,7 +328,7 @@ class SchedulerCase(unittest.TestCase): empty_completed.set() scheduler.notifier.publish = notify - scheduler.start() + scheduler.start(loop) scheduler.submit("main", expid_bg, -99, None, False) loop.run_until_complete(background_running.wait()) self.assertFalse(scheduler.check_pause(0)) @@ -379,7 +379,7 @@ class SchedulerCase(unittest.TestCase): empty_ready.set() scheduler.notifier.publish = notify - scheduler.start() + scheduler.start(loop) scheduler.submit("main", expid_bg, -99, None, False) loop.run_until_complete(background_running.wait()) @@ -417,7 +417,7 @@ class SchedulerCase(unittest.TestCase): done.set() scheduler.notifier.publish = notify - scheduler.start() + scheduler.start(loop) scheduler.submit("main", expid, 0, None, False) loop.run_until_complete(first_preparing.wait()) scheduler.submit("main", expid, 1, None, True)