Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.scheduler.tests.test_api_client.TestScheduler::test_grab_ready_priority_tasks
Failed

TEST RESULT

Run At
May 6 2021, 4:19 PM
Details
self = <swh.scheduler.tests.test_scheduler.TestScheduler object at 0x7f1b9ddf5e10> swh_scheduler = <RemoteScheduler url=mock://example.com/> def test_grab_ready_priority_tasks(self, swh_scheduler): """check the grab and peek priority tasks endpoint behave as expected""" self._create_task_types(swh_scheduler) t = utcnow() task_type = TEMPLATES["git"]["type"] num_tasks = 100 # Create tasks with and without priorities tasks0 = tasks_with_priority_from_template( TEMPLATES["git"], t, num_tasks, "high", ) tasks1 = tasks_with_priority_from_template( TEMPLATES["hg"], t, num_tasks, "low", ) tasks2 = tasks_with_priority_from_template( TEMPLATES["hg"], t, num_tasks, "normal", ) tasks = tasks0 + tasks1 + tasks2 random.shuffle(tasks) swh_scheduler.create_tasks(tasks) ready_tasks = swh_scheduler.peek_ready_priority_tasks(task_type, num_tasks=50) grabbed_tasks = swh_scheduler.grab_ready_priority_tasks(task_type, num_tasks=50) > for peeked, grabbed in zip(sorted(ready_tasks), sorted(grabbed_tasks)): E TypeError: '<' not supported between instances of 'dict' and 'dict' .tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_scheduler.py:272: TypeError