@@ -852,6 +852,7 @@ def on_foo(self, a, b):
852852 def test_handle_reconnect (self , random ):
853853 c = client .Client ()
854854 c ._reconnect_task = 'foo'
855+ c ._reconnect_abort = c .eio .create_event ()
855856 c ._reconnect_abort .wait = mock .MagicMock (return_value = False )
856857 c .connect = mock .MagicMock (
857858 side_effect = [ValueError , exceptions .ConnectionError , None ]
@@ -869,6 +870,7 @@ def test_handle_reconnect(self, random):
869870 def test_handle_reconnect_max_delay (self , random ):
870871 c = client .Client (reconnection_delay_max = 3 )
871872 c ._reconnect_task = 'foo'
873+ c ._reconnect_abort = c .eio .create_event ()
872874 c ._reconnect_abort .wait = mock .MagicMock (return_value = False )
873875 c .connect = mock .MagicMock (
874876 side_effect = [ValueError , exceptions .ConnectionError , None ]
@@ -886,6 +888,7 @@ def test_handle_reconnect_max_delay(self, random):
886888 def test_handle_reconnect_max_attempts (self , random ):
887889 c = client .Client (reconnection_attempts = 2 )
888890 c ._reconnect_task = 'foo'
891+ c ._reconnect_abort = c .eio .create_event ()
889892 c ._reconnect_abort .wait = mock .MagicMock (return_value = False )
890893 c .connect = mock .MagicMock (
891894 side_effect = [ValueError , exceptions .ConnectionError , None ]
@@ -902,6 +905,7 @@ def test_handle_reconnect_max_attempts(self, random):
902905 def test_handle_reconnect_aborted (self , random ):
903906 c = client .Client ()
904907 c ._reconnect_task = 'foo'
908+ c ._reconnect_abort = c .eio .create_event ()
905909 c ._reconnect_abort .wait = mock .MagicMock (side_effect = [False , True ])
906910 c .connect = mock .MagicMock (side_effect = exceptions .ConnectionError )
907911 c ._handle_reconnect ()
0 commit comments