Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeWarning: coroutine 'Server.wait_closed' was never awaited #2004

Closed
riderx opened this issue Jan 15, 2021 · 5 comments
Closed

RuntimeWarning: coroutine 'Server.wait_closed' was never awaited #2004

riderx opened this issue Jan 15, 2021 · 5 comments

Comments

@riderx
Copy link

riderx commented Jan 15, 2021

Describe the bug
With python 3.9.1 i got this issue when i run test or exit the server:

tests/test_runner.py::test_init
  /usr/local/Cellar/[email protected]/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py:667: RuntimeWarning: coroutine 'Server.wait_closed' was never awaited
    self._ready.clear()

Expected behavior
The server should close proprely

you can check the code there :
https://github.com/jupyter-naas/naas
and the issue on the CI :
https://github.com/jupyter-naas/naas/runs/1696392246?check_suite_focus=true

Environment (please complete the following information):

  • OS: mac osx 11.0.1
  • python 3.9.1
    -sanic : sanic>=20,<21
  • pytest-sanic>=1,<2

Additional context
Add any other context about the problem here.

@ahopkins
Copy link
Member

Server details? Version?

@riderx
Copy link
Author

riderx commented Jan 15, 2021

Hey @ahopkins thanks for your rapid feedback i updated !
the best way to check it is on our CI ( we are open source )
https://github.com/jupyter-naas/naas/runs/1696392246?check_suite_focus=true

@sjsadowski
Copy link
Contributor

@riderx Looks like the test is being run with python 3.8.4 and ubuntu 18.04 LTS - this contradicts the above info; can you just clarify so we're not chasing herrings?

@ahopkins
Copy link
Member

ahopkins commented Jan 18, 2021

The error I saw in your tests was this:

E           sanic.exceptions.SanicException: Sanic app name "naas.runner.runner" already in use.

See this for solution

@riderx
Copy link
Author

riderx commented Jan 18, 2021

Guys thanks a lot

Sanic.test_mode = True

fixed my issue ! <3

@riderx riderx closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants