executing tests/api/test_comoco_history.py throws some errors which require further investigation. Hypothesis is that ioloop/motor watch cleanup is not implemented properly.
2019-06-26 13:57:14,638 - WARNING [core4.service.setup.CoreSetup/None] created folder [/tmp/pytest-of-mra/pytest-216/test_comoco_history_get_some_p0/transfer]
2019-06-26 13:57:14,639 - WARNING [core4.service.setup.CoreSetup/None] created folder [/tmp/pytest-of-mra/pytest-216/test_comoco_history_get_some_p0/proc]
2019-06-26 13:57:14,640 - WARNING [core4.service.setup.CoreSetup/None] created folder [/tmp/pytest-of-mra/pytest-216/test_comoco_history_get_some_p0/arch]
2019-06-26 13:57:14,640 - WARNING [core4.service.setup.CoreSetup/None] created folder [/tmp/pytest-of-mra/pytest-216/test_comoco_history_get_some_p0/temp]
2019-06-26 13:57:14,659 - INFO [core4.service.setup.CoreSetup/None] created index [job_args] on [sys.queue]
2019-06-26 13:57:14,674 - INFO [core4.service.setup.CoreSetup/None] created index [ttl] on [sys.stdout]
2019-06-26 13:57:14,706 - INFO [core4.service.setup.CoreSetup/None] created index [unique_name] on [sys.role]
2019-06-26 13:57:14,715 - INFO [core4.service.setup.CoreSetup/None] created index [unique_email] on [sys.role]
2019-06-26 13:57:14,737 - INFO [core4.service.setup.CoreSetup/None] created user [admin]
2019-06-26 13:57:14,739 - INFO [core4.service.setup.CoreSetup/None] created user [standard_user]
2019-06-26 13:57:14,770 - INFO [core4.api.v1.tool.serve.CoreApiServerTool/app@devops] successfully registered container [core4.api.v1.server.CoreApiServer] at [/core4/api/v1.*]
2019-06-26 13:57:14,770 - INFO [core4.api.v1.tool.serve.CoreApiServerTool/app@devops] registering server [app@devops] at [http://0.0.0.0:38929]
2019-06-26 13:57:14,793 - INFO [core4.api.v1.tool.serve.CoreApiServerTool/app@devops] found [1] application, handlers registered [0], reset [0], updated [0], created [16]
2019-06-26 13:57:14,827 - INFO [core4.api.v1.tool.serve.CoreApiServerTool/app@devops] open NOT secure socket on port [0.0.0.0:38929] routed at [http://0.0.0.0:38929]
PASSED [ 63%]http://127.0.0.1:38929/core4/api/v1/login?password=hans&username=admin
http://127.0.0.1:38929/core4/api/v1/comoco/history?page=1&sort=1&startDate=2017-01-01T00%3A00%3A00&perPage=1
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,881 - ERROR [basename:ioloop.py/None] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f4744171730>, <Task finished coro=<watch() done, defined at /home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py:30> exception=KeyError('fullDocument',)>)
Traceback (most recent call last):
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/mra/PycharmProjects/core4/.venv/lib/python3.5/site-packages/tornado/ioloop.py", line 779, in _discard_future_result
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 35, in watch
EventHandler.on_event(change)
File "/home/mra/PycharmProjects/core4/core4/api/v1/request/standard/event.py", line 180, in on_event
doc = change["fullDocument"]
KeyError: 'fullDocument'
2019-06-26 13:57:14,973 - INFO [core4.api.v1.request.role.model.CoreRole/5d1379baad70713b2c1564e0] set [last_login] for role [admin] with _id [5d1379baad70713b2c1564b5]
2019-06-26 13:57:14,977 - INFO [core4.api.v1.request.standard.login.LoginHandler/5d1379baad70713b2c1564e0] [200] [GET /core4/api/v1/login] in [80.71ms] by [admin] from [app@devops]
2019-06-26 13:57:15,073 - INFO [core4.api.v1.request.queue.history.ComocoHistoryHandler/5d1379baad70713b2c1564e6] [200] [GET /core4/api/v1/comoco/history] in [91.98ms] by [admin] from [app@devops]