Merge branch 'master' of github.com:mongodb/mongo-python-driver

This commit is contained in:
Steven Silvester 2024-08-13 08:10:23 -05:00
commit 3c7100c67f
No known key found for this signature in database
GPG Key ID: B1BF5EC3A8B32F91
2 changed files with 4 additions and 2 deletions

View File

@ -523,7 +523,7 @@ class TestClientBulkWriteCRUD(AsyncIntegrationTest):
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#11-multi-batch-bulkwrites
class TestClientBulkWriteTimeout(AsyncIntegrationTest):
class TestClientBulkWriteCSOT(AsyncIntegrationTest):
async def asyncSetUp(self):
self.max_write_batch_size = await async_client_context.max_write_batch_size
self.max_bson_object_size = await async_client_context.max_bson_size
@ -567,6 +567,7 @@ class TestClientBulkWriteTimeout(AsyncIntegrationTest):
w="majority",
)
self.addAsyncCleanup(client.aclose)
await client.admin.command("ping") # Init the client first.
with self.assertRaises(ClientBulkWriteException) as context:
await client.bulk_write(models=models)
self.assertIsInstance(context.exception.error, NetworkTimeout)

View File

@ -523,7 +523,7 @@ class TestClientBulkWriteCRUD(IntegrationTest):
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#11-multi-batch-bulkwrites
class TestClientBulkWriteTimeout(IntegrationTest):
class TestClientBulkWriteCSOT(IntegrationTest):
def setUp(self):
self.max_write_batch_size = client_context.max_write_batch_size
self.max_bson_object_size = client_context.max_bson_size
@ -567,6 +567,7 @@ class TestClientBulkWriteTimeout(IntegrationTest):
w="majority",
)
self.addCleanup(client.close)
client.admin.command("ping") # Init the client first.
with self.assertRaises(ClientBulkWriteException) as context:
client.bulk_write(models=models)
self.assertIsInstance(context.exception.error, NetworkTimeout)