Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Jun 23 2021, 6:13 PM
Details
self = <swh.scheduler.tests.test_scheduler.TestScheduler object at 0x7fd39d8da1d0> swh_scheduler = <RemoteScheduler url=mock://example.com/> def test_create_tasks(self, swh_scheduler): self._create_task_types(swh_scheduler) num_git = 100 tasks_1 = tasks_from_template(TEMPLATES["git"], utcnow(), num_git) tasks_2 = tasks_from_template( TEMPLATES["hg"], utcnow(), num_priorities=NUM_PRIORITY_TASKS ) tasks = tasks_1 + tasks_2 # tasks are returned only once with their ids > ret1 = swh_scheduler.create_tasks(tasks + tasks) .tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_scheduler.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:181: in meth_ return self.post(meth._endpoint_path, post_data) .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:278: in post return self._decode_response(response) .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:354: in _decode_response self.raise_for_status(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <RemoteScheduler url=mock://example.com/>, response = <Response [500]> def raise_for_status(self, response) -> None: """check response HTTP status code and raise an exception if it denotes an error; do nothing otherwise """ status_code = response.status_code status_class = response.status_code // 100 if status_code == 404: raise RemoteException(payload="404 not found", response=response) exception = None # TODO: only old servers send pickled error; stop trying to unpickle # after they are all upgraded try: if status_class == 4: data = self._decode_response(response, check_status=False) if isinstance(data, dict): # TODO: remove "exception" key check once all servers # are using new schema exc_data = data["exception"] if "exception" in data else data for exc_type in self.reraise_exceptions: if exc_type.__name__ == exc_data["type"]: exception = exc_type(*exc_data["args"]) break else: exception = RemoteException(payload=exc_data, response=response) else: exception = pickle.loads(data) elif status_class == 5: data = self._decode_response(response, check_status=False) if "exception_pickled" in data: exception = pickle.loads(data["exception_pickled"]) else: # TODO: remove "exception" key check once all servers # are using new schema exc_data = data["exception"] if "exception" in data else data exception = RemoteException(payload=exc_data, response=response) except (TypeError, pickle.UnpicklingError): raise RemoteException(payload=data, response=response) if exception: > raise exception from None E swh.core.api.RemoteException: <RemoteException 500 UndefinedFunction: ['function swh_scheduler_mktemp_task() does not exist\nLINE 1: select swh_scheduler_mktemp_task()\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.\n']> .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:344: RemoteException