-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5092 - Convert test.test_pooling to async #2145
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
Conversation
test/asynchronous/test_pooling.py
Outdated
await db.test.insert_many([{} for _ in range(10)]) | ||
|
||
async def asyncTearDown(self): | ||
await self.c.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this self.c.close()
needed? I thought async_rs_or_single_client()
would close it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Removed.
@@ -15,18 +15,20 @@ | |||
"""Test built in connection-pooling with threads.""" | |||
from __future__ import annotations | |||
|
|||
import asyncio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought synchro.py was supposed to remove asyncio imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't remove asyncio imports. We still have some files that have _IS_SYNC
branches that make use of asyncio
.
test/test_pooling.py
Outdated
import time | ||
from test.helpers import ConcurrentRunner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move this down next to the other test imports.
No description provided.