File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1818import copy
1919import gc
2020import itertools
21+ import os
2122import random
2223import re
2324import sys
@@ -1412,6 +1413,8 @@ async def test_to_list_length(self):
14121413 self .assertEqual (len (docs ), 2 )
14131414
14141415 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..." )
14151418 client = await self .async_single_client (timeoutMS = 500 , w = 1 )
14161419 coll = client .pymongo .test
14171420 # 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):
14531456
14541457 @async_client_context .require_failCommand_blockConnection
14551458 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..." )
14561461 client = await self .async_single_client (timeoutMS = 500 , w = 1 )
14571462 coll = client .pymongo .test
14581463 # Initialize the client with a larger timeout to help make test less flakey
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ class TestCSOT(IntegrationTest):
3939 RUN_ON_LOAD_BALANCER = True
4040
4141 def test_timeout_nested (self ):
42+ if os .environ .get ("SKIP_CSOT_TESTS" , "" ):
43+ raise unittest .SkipTest ("SKIP_CSOT_TESTS is set, skipping..." )
4244 coll = self .db .coll
4345 self .assertEqual (_csot .get_timeout (), None )
4446 self .assertEqual (_csot .get_deadline (), float ("inf" ))
@@ -76,6 +78,8 @@ def test_timeout_nested(self):
7678
7779 @client_context .require_change_streams
7880 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..." )
7983 coll = self .db .test
8084 coll .insert_one ({})
8185 with coll .watch () as stream :
Original file line number Diff line number Diff line change 1818import copy
1919import gc
2020import itertools
21+ import os
2122import random
2223import re
2324import sys
@@ -1403,6 +1404,8 @@ def test_to_list_length(self):
14031404 self .assertEqual (len (docs ), 2 )
14041405
14051406 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..." )
14061409 client = self .single_client (timeoutMS = 500 , w = 1 )
14071410 coll = client .pymongo .test
14081411 # 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):
14441447
14451448 @client_context .require_failCommand_blockConnection
14461449 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..." )
14471452 client = self .single_client (timeoutMS = 500 , w = 1 )
14481453 coll = client .pymongo .test
14491454 # Initialize the client with a larger timeout to help make test less flakey
You can’t perform that action at this time.
0 commit comments