-
Notifications
You must be signed in to change notification settings - Fork 98
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
something wrong in my app with error "close cannot be used while an asynchronous query is underway" #53
Comments
Probably that's some kind of edge case with |
I have this bug without uvloop. |
Yes. I have the same issue. |
You should explicity call |
I get this while performing unit tests. I have a series of simple tests to grab an entity with a simple manager context query. If I try to execute more than one during a test, I get this error.
|
I was getting this same issue.
After tracing through the issue, I determined it was due to my setup with pytest-asyncio since that library does the following in the default event_loop fixture:
To fix the issue, I created a conftest.py file at the root of my tests that has the following replacement fixture. import pytest
import asyncio
@pytest.fixture(scope='session')
def event_loop():
return asyncio.new_event_loop() Maybe this will help someone else who lands here from google. |
Renctly I tried to redeploy my project used with sanic frame ,some errors happened when I do a test under high-concurrency.
info in the log:
and the traceback is below:
what caused this problem?
The text was updated successfully, but these errors were encountered: