File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed
Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,6 @@ async def _execute_command(
569569 and "errorLabels" in error .details
570570 and isinstance (error .details ["errorLabels" ], list )
571571 and "RetryableError" in error .details ["errorLabels" ]
572- and "SystemOverloadedError" in error .details ["errorLabels" ]
573572 )
574573
575574 # Synthesize the full bulk result without modifying the
Original file line number Diff line number Diff line change @@ -567,7 +567,6 @@ def _execute_command(
567567 and "errorLabels" in error .details
568568 and isinstance (error .details ["errorLabels" ], list )
569569 and "RetryableError" in error .details ["errorLabels" ]
570- and "SystemOverloadedError" in error .details ["errorLabels" ]
571570 )
572571
573572 # Synthesize the full bulk result without modifying the
Original file line number Diff line number Diff line change @@ -96,20 +96,18 @@ async def test_retry_overload_error_find(self):
9696
9797 @async_client_context .require_failCommand_appName
9898 async def test_retry_overload_error_insert_one (self ):
99- await self .db .t .insert_one ({"x" : 1 })
100-
10199 # Ensure command is retried on overload error.
102100 fail_many = mock_overload_error .copy ()
103101 fail_many ["mode" ] = {"times" : _MAX_RETRIES }
104102 async with self .fail_point (fail_many ):
105- await self .db .t .find_one ( )
103+ await self .db .t .insert_one ({ "x" : 1 } )
106104
107105 # Ensure command stops retrying after _MAX_RETRIES.
108106 fail_too_many = mock_overload_error .copy ()
109107 fail_too_many ["mode" ] = {"times" : _MAX_RETRIES + 1 }
110108 async with self .fail_point (fail_too_many ):
111109 with self .assertRaises (PyMongoError ) as error :
112- await self .db .t .find_one ( )
110+ await self .db .t .insert_one ({ "x" : 1 } )
113111
114112 self .assertIn ("RetryableError" , str (error .exception ))
115113 self .assertIn ("SystemOverloadedError" , str (error .exception ))
Original file line number Diff line number Diff line change @@ -96,20 +96,18 @@ def test_retry_overload_error_find(self):
9696
9797 @client_context .require_failCommand_appName
9898 def test_retry_overload_error_insert_one (self ):
99- self .db .t .insert_one ({"x" : 1 })
100-
10199 # Ensure command is retried on overload error.
102100 fail_many = mock_overload_error .copy ()
103101 fail_many ["mode" ] = {"times" : _MAX_RETRIES }
104102 with self .fail_point (fail_many ):
105- self .db .t .find_one ( )
103+ self .db .t .insert_one ({ "x" : 1 } )
106104
107105 # Ensure command stops retrying after _MAX_RETRIES.
108106 fail_too_many = mock_overload_error .copy ()
109107 fail_too_many ["mode" ] = {"times" : _MAX_RETRIES + 1 }
110108 with self .fail_point (fail_too_many ):
111109 with self .assertRaises (PyMongoError ) as error :
112- self .db .t .find_one ( )
110+ self .db .t .insert_one ({ "x" : 1 } )
113111
114112 self .assertIn ("RetryableError" , str (error .exception ))
115113 self .assertIn ("SystemOverloadedError" , str (error .exception ))
You can’t perform that action at this time.
0 commit comments