@@ -358,7 +358,8 @@ def test_no_req_ids(self, *args):
358358 self .assertEqual (max_connection .send_msg .call_count , 0 )
359359 self .assertEqual (max_connection .send_msg .call_count , 0 )
360360 max_connection .defunct .assert_has_calls ([call (ANY )] * get_holders .call_count )
361- holder .return_connection .assert_has_calls ([call (max_connection )] * get_holders .call_count )
361+ holder .return_connection .assert_has_calls (
362+ [call (max_connection , mark_host_down = True )] * get_holders .call_count )
362363
363364 def test_unexpected_response (self , * args ):
364365 request_id = 999
@@ -386,7 +387,8 @@ def send_msg(msg, req_id, msg_callback):
386387 exc = connection .defunct .call_args_list [0 ][0 ][0 ]
387388 self .assertIsInstance (exc , ConnectionException )
388389 self .assertRegexpMatches (exc .args [0 ], r'^Received unexpected response to OptionsMessage.*' )
389- holder .return_connection .assert_has_calls ([call (connection )] * get_holders .call_count )
390+ holder .return_connection .assert_has_calls (
391+ [call (connection , mark_host_down = True )] * get_holders .call_count )
390392
391393 def test_timeout (self , * args ):
392394 request_id = 999
@@ -415,7 +417,8 @@ def send_msg(msg, req_id, msg_callback):
415417 self .assertIsInstance (exc , OperationTimedOut )
416418 self .assertEqual (exc .errors , 'Connection heartbeat timeout after 0.05 seconds' )
417419 self .assertEqual (exc .last_host , 'localhost' )
418- holder .return_connection .assert_has_calls ([call (connection )] * get_holders .call_count )
420+ holder .return_connection .assert_has_calls (
421+ [call (connection , mark_host_down = True )] * get_holders .call_count )
419422
420423
421424class TimerTest (unittest .TestCase ):
0 commit comments