Merge branch 'master' of github.com:mongodb/mongo-python-driver
This commit is contained in:
commit
35698e05df
@ -18,6 +18,7 @@ from __future__ import annotations
|
||||
import copy
|
||||
import gc
|
||||
import itertools
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
@ -1412,6 +1413,8 @@ class TestCursor(AsyncIntegrationTest):
|
||||
self.assertEqual(len(docs), 2)
|
||||
|
||||
async def test_to_list_csot_applied(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
client = await self.async_single_client(timeoutMS=500, w=1)
|
||||
coll = client.pymongo.test
|
||||
# Initialize the client with a larger timeout to help make test less flakey
|
||||
@ -1453,6 +1456,8 @@ class TestCursor(AsyncIntegrationTest):
|
||||
|
||||
@async_client_context.require_failCommand_blockConnection
|
||||
async def test_command_cursor_to_list_csot_applied(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
client = await self.async_single_client(timeoutMS=500, w=1)
|
||||
coll = client.pymongo.test
|
||||
# Initialize the client with a larger timeout to help make test less flakey
|
||||
|
||||
@ -442,6 +442,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
|
||||
RUN_ON_LOAD_BALANCER = True
|
||||
RUN_ON_SERVERLESS = True
|
||||
TEST_SPEC: Any
|
||||
TEST_PATH = "" # This gets filled in by generate_test_classes
|
||||
mongos_clients: list[AsyncMongoClient] = []
|
||||
|
||||
@staticmethod
|
||||
|
||||
@ -39,6 +39,8 @@ class TestCSOT(IntegrationTest):
|
||||
RUN_ON_LOAD_BALANCER = True
|
||||
|
||||
def test_timeout_nested(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
coll = self.db.coll
|
||||
self.assertEqual(_csot.get_timeout(), None)
|
||||
self.assertEqual(_csot.get_deadline(), float("inf"))
|
||||
@ -76,6 +78,8 @@ class TestCSOT(IntegrationTest):
|
||||
|
||||
@client_context.require_change_streams
|
||||
def test_change_stream_can_resume_after_timeouts(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
coll = self.db.test
|
||||
coll.insert_one({})
|
||||
with coll.watch() as stream:
|
||||
|
||||
@ -18,6 +18,7 @@ from __future__ import annotations
|
||||
import copy
|
||||
import gc
|
||||
import itertools
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
@ -1403,6 +1404,8 @@ class TestCursor(IntegrationTest):
|
||||
self.assertEqual(len(docs), 2)
|
||||
|
||||
def test_to_list_csot_applied(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
client = self.single_client(timeoutMS=500, w=1)
|
||||
coll = client.pymongo.test
|
||||
# Initialize the client with a larger timeout to help make test less flakey
|
||||
@ -1444,6 +1447,8 @@ class TestCursor(IntegrationTest):
|
||||
|
||||
@client_context.require_failCommand_blockConnection
|
||||
def test_command_cursor_to_list_csot_applied(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
client = self.single_client(timeoutMS=500, w=1)
|
||||
coll = client.pymongo.test
|
||||
# Initialize the client with a larger timeout to help make test less flakey
|
||||
|
||||
@ -441,6 +441,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
|
||||
RUN_ON_LOAD_BALANCER = True
|
||||
RUN_ON_SERVERLESS = True
|
||||
TEST_SPEC: Any
|
||||
TEST_PATH = "" # This gets filled in by generate_test_classes
|
||||
mongos_clients: list[MongoClient] = []
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
Reference in New Issue
Block a user