File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -1847,20 +1847,20 @@ def server_description_count():
18471847 return i
18481848
18491849 gc .collect ()
1850- with client_knobs (min_heartbeat_interval = 0.002 ):
1850+ with client_knobs (min_heartbeat_interval = 0.003 ):
18511851 client = self .simple_client (
1852- "invalid:27017" , heartbeatFrequencyMS = 2 , serverSelectionTimeoutMS = 200
1852+ "invalid:27017" , heartbeatFrequencyMS = 3 , serverSelectionTimeoutMS = 150
18531853 )
18541854 initial_count = server_description_count ()
18551855 with self .assertRaises (ServerSelectionTimeoutError ):
18561856 await client .test .test .find_one ()
18571857 gc .collect ()
18581858 final_count = server_description_count ()
1859- await client .close ()
18601859 # If a bug like PYTHON-2433 is reintroduced then too many
18611860 # ServerDescriptions will be kept alive and this test will fail:
1862- # AssertionError: 11 != 47 within 20 delta (36 difference)
1863- self .assertAlmostEqual (initial_count , final_count , delta = 30 )
1861+ # AssertionError: 19 != 46 within 15 delta (27 difference)
1862+ # On Python 3.11 we seem to get more of a delta.
1863+ self .assertAlmostEqual (initial_count , final_count , delta = 20 )
18641864
18651865 @async_client_context .require_failCommand_fail_point
18661866 async def test_network_error_message (self ):
Original file line number Diff line number Diff line change @@ -1804,20 +1804,20 @@ def server_description_count():
18041804 return i
18051805
18061806 gc .collect ()
1807- with client_knobs (min_heartbeat_interval = 0.002 ):
1807+ with client_knobs (min_heartbeat_interval = 0.003 ):
18081808 client = self .simple_client (
1809- "invalid:27017" , heartbeatFrequencyMS = 2 , serverSelectionTimeoutMS = 200
1809+ "invalid:27017" , heartbeatFrequencyMS = 3 , serverSelectionTimeoutMS = 150
18101810 )
18111811 initial_count = server_description_count ()
18121812 with self .assertRaises (ServerSelectionTimeoutError ):
18131813 client .test .test .find_one ()
18141814 gc .collect ()
18151815 final_count = server_description_count ()
1816- client .close ()
18171816 # If a bug like PYTHON-2433 is reintroduced then too many
18181817 # ServerDescriptions will be kept alive and this test will fail:
1819- # AssertionError: 11 != 47 within 20 delta (36 difference)
1820- self .assertAlmostEqual (initial_count , final_count , delta = 30 )
1818+ # AssertionError: 19 != 46 within 15 delta (27 difference)
1819+ # On Python 3.11 we seem to get more of a delta.
1820+ self .assertAlmostEqual (initial_count , final_count , delta = 20 )
18211821
18221822 @client_context .require_failCommand_fail_point
18231823 def test_network_error_message (self ):
You can’t perform that action at this time.
0 commit comments