Skip to content

Conversation

NoahStapp
Copy link
Contributor

No description provided.

await db.test.insert_many([{} for _ in range(10)])

async def asyncTearDown(self):
await self.c.close()
Copy link
Contributor

@sleepyStick sleepyStick Feb 12, 2025

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Removed.

"""Test built in connection-pooling with threads."""
from __future__ import annotations

import asyncio
Copy link
Member

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?

Copy link
Contributor Author

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.

import sys
import threading
import time
from test.helpers import ConcurrentRunner
Copy link
Member

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.

@NoahStapp NoahStapp merged commit 338b7dc into mongodb:master Feb 13, 2025
45 of 51 checks passed
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

Successfully merging this pull request may close these issues.

3 participants