File tree 5 files changed +16
-0
lines changed 5 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 18
18
import copy
19
19
import gc
20
20
import itertools
21
+ import os
21
22
import random
22
23
import re
23
24
import sys
@@ -1412,6 +1413,8 @@ async def test_to_list_length(self):
1412
1413
self .assertEqual (len (docs ), 2 )
1413
1414
1414
1415
async def test_to_list_csot_applied (self ):
1416
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
1417
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
1415
1418
client = await self .async_single_client (timeoutMS = 500 , w = 1 )
1416
1419
coll = client .pymongo .test
1417
1420
# Initialize the client with a larger timeout to help make test less flakey
@@ -1453,6 +1456,8 @@ async def test_command_cursor_to_list_length(self):
1453
1456
1454
1457
@async_client_context .require_failCommand_blockConnection
1455
1458
async def test_command_cursor_to_list_csot_applied (self ):
1459
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
1460
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
1456
1461
client = await self .async_single_client (timeoutMS = 500 , w = 1 )
1457
1462
coll = client .pymongo .test
1458
1463
# Initialize the client with a larger timeout to help make test less flakey
Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
442
442
RUN_ON_LOAD_BALANCER = True
443
443
RUN_ON_SERVERLESS = True
444
444
TEST_SPEC : Any
445
+ TEST_PATH = "" # This gets filled in by generate_test_classes
445
446
mongos_clients : list [AsyncMongoClient ] = []
446
447
447
448
@staticmethod
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ class TestCSOT(IntegrationTest):
39
39
RUN_ON_LOAD_BALANCER = True
40
40
41
41
def test_timeout_nested (self ):
42
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
43
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
42
44
coll = self .db .coll
43
45
self .assertEqual (_csot .get_timeout (), None )
44
46
self .assertEqual (_csot .get_deadline (), float ("inf" ))
@@ -76,6 +78,8 @@ def test_timeout_nested(self):
76
78
77
79
@client_context .require_change_streams
78
80
def test_change_stream_can_resume_after_timeouts (self ):
81
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
82
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
79
83
coll = self .db .test
80
84
coll .insert_one ({})
81
85
with coll .watch () as stream :
Original file line number Diff line number Diff line change 18
18
import copy
19
19
import gc
20
20
import itertools
21
+ import os
21
22
import random
22
23
import re
23
24
import sys
@@ -1403,6 +1404,8 @@ def test_to_list_length(self):
1403
1404
self .assertEqual (len (docs ), 2 )
1404
1405
1405
1406
def test_to_list_csot_applied (self ):
1407
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
1408
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
1406
1409
client = self .single_client (timeoutMS = 500 , w = 1 )
1407
1410
coll = client .pymongo .test
1408
1411
# Initialize the client with a larger timeout to help make test less flakey
@@ -1444,6 +1447,8 @@ def test_command_cursor_to_list_length(self):
1444
1447
1445
1448
@client_context .require_failCommand_blockConnection
1446
1449
def test_command_cursor_to_list_csot_applied (self ):
1450
+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
1451
+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
1447
1452
client = self .single_client (timeoutMS = 500 , w = 1 )
1448
1453
coll = client .pymongo .test
1449
1454
# Initialize the client with a larger timeout to help make test less flakey
Original file line number Diff line number Diff line change @@ -441,6 +441,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
441
441
RUN_ON_LOAD_BALANCER = True
442
442
RUN_ON_SERVERLESS = True
443
443
TEST_SPEC : Any
444
+ TEST_PATH = "" # This gets filled in by generate_test_classes
444
445
mongos_clients : list [MongoClient ] = []
445
446
446
447
@staticmethod
You can’t perform that action at this time.
0 commit comments