From f4392041b2641928b5ecfd0e662d8e04fd9ee584 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 26 Aug 2024 14:39:48 -0500 Subject: [PATCH] PYTHON-4692 Skip TestClientBulkWriteCSOT on MacOS and Windows (#1810) --- test/asynchronous/test_client_bulk_write.py | 3 +++ test/test_client_bulk_write.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/test/asynchronous/test_client_bulk_write.py b/test/asynchronous/test_client_bulk_write.py index 458d11985..c35e823d0 100644 --- a/test/asynchronous/test_client_bulk_write.py +++ b/test/asynchronous/test_client_bulk_write.py @@ -15,6 +15,7 @@ """Test the client bulk write API.""" from __future__ import annotations +import os import sys sys.path[0:0] = [""] @@ -567,6 +568,8 @@ class TestClientBulkWriteCRUD(AsyncIntegrationTest): # https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#11-multi-batch-bulkwrites class TestClientBulkWriteCSOT(AsyncIntegrationTest): async def asyncSetUp(self): + if os.environ.get("SKIP_CSOT_TESTS", ""): + raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...") 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 self.max_message_size_bytes = await async_client_context.max_message_size_bytes diff --git a/test/test_client_bulk_write.py b/test/test_client_bulk_write.py index 6c6188cf6..ee19a0417 100644 --- a/test/test_client_bulk_write.py +++ b/test/test_client_bulk_write.py @@ -15,6 +15,7 @@ """Test the client bulk write API.""" from __future__ import annotations +import os import sys sys.path[0:0] = [""] @@ -567,6 +568,8 @@ class TestClientBulkWriteCRUD(IntegrationTest): # https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#11-multi-batch-bulkwrites class TestClientBulkWriteCSOT(IntegrationTest): def setUp(self): + if os.environ.get("SKIP_CSOT_TESTS", ""): + raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...") self.max_write_batch_size = client_context.max_write_batch_size self.max_bson_object_size = client_context.max_bson_size self.max_message_size_bytes = client_context.max_message_size_bytes