gleb-sevruk / pycrunch-engine

NCrunch inspired tool for continuous testing Python
https://pycrunch.com
Other
57 stars 8 forks source link

Fix broken aiohttp dependency #60

Closed gleb-sevruk closed 2 years ago

gleb-sevruk commented 2 years ago

Changes in https://github.com/aio-libs/aiohttp/pull/5572 caused an error. (attached)

This condition will fix the error by reusing the existing event_loop. In aiohttp>=3.8

[63747] 2021-11-23 01:39:29,814 - pycrunch.watchdog.connection_watchdog - INFO - ConnectionWatchdog->connection_established
[63747] 2021-11-23 01:39:29,815 - pycrunch.runner.pipeline_dispatcher - INFO - Dispatcher thread -- Start
[63747] 2021-11-23 01:39:29,820 - pycrunch.watchdog.watchdog - INFO - WatchDog Dispatcher thread -- Start
[63747] 2021-11-23 01:39:29,822 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished coro=<dispather_thread() done, defined at /Users/gleb/code/PyCrunch/pycrunch/runner/pipeline_dispatcher.py:15> exception=RuntimeError('Task <Task pending coro=<dispather_thread() running at /Users/gleb/code/PyCrunch/pycrunch/runner/pipeline_dispatcher.py:19>> got Future <Future pending created at /usr/local/Cellar/python@3.6/3.6.15/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py:299> attached to a different loop',)>
Traceback (most recent call last):
  File "/Users/gleb/code/PyCrunch/pycrunch/runner/pipeline_dispatcher.py", line 19, in dispather_thread
    task = await execution_pipeline.get_task()
  File "/Users/gleb/code/PyCrunch/pycrunch/pipeline/execution_pipeline.py", line 18, in get_task
    return await self.q.get()
  File "/usr/local/Cellar/python@3.6/3.6.15/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/queues.py", line 167, in get
    yield from getter
RuntimeError: Task <Task pending coro=<dispather_thread() running at /Users/gleb/code/PyCrunch/pycrunch/runner/pipeline_dispatcher.py:19>> got Future <Future pending created at /usr/local/Cellar/python@3.6/3.6.15/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py:299> attached to a different loop
[63747] 2021-11-23 01:39:29,823 - pycrunch.watchdog.watchdog - ERROR - Exception in WatchDog Dispatcher Thread, 
Traceback (most recent call last):
  File "/Users/gleb/code/PyCrunch/pycrunch/watchdog/watchdog.py", line 46, in watchdog_dispather_thread
    await dp.run_once()
  File "/Users/gleb/code/PyCrunch/pycrunch/watchdog/watchdog.py", line 18, in run_once
    task = await watchdog_pipeline.get_task()
  File "/Users/gleb/code/PyCrunch/pycrunch/watchdog/watchdog_pipeline.py", line 22, in get_task
    return await self.q.get()
  File "/usr/local/Cellar/python@3.6/3.6.15/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/queues.py", line 167, in get
    yield from getter