1414from redis .connection import ConnectionInterface
1515from redis .maintenance_events import (
1616 EndpointType ,
17- MaintenanceEventsConfig ,
17+ MaintNotificationsConfig ,
1818 MaintenanceState ,
1919)
2020from tests .test_scenario .conftest import (
@@ -255,7 +255,7 @@ def _validate_moving_state(
255255 and conn .host != conn .orig_host_address
256256 and (
257257 configured_endpoint_type
258- == MaintenanceEventsConfig ().get_endpoint_type (conn .host , conn )
258+ == MaintNotificationsConfig ().get_endpoint_type (conn .host , conn )
259259 )
260260 )
261261 )
@@ -330,7 +330,7 @@ def _validate_default_notif_disabled_state(
330330 @pytest .mark .timeout (300 ) # 5 minutes timeout for this test
331331 def test_receive_failing_over_and_failed_over_push_notification (
332332 self ,
333- client_maint_events : Redis ,
333+ client_maint_notifications : Redis ,
334334 fault_injector_client : FaultInjectorClient ,
335335 endpoints_config : Dict [str , Any ],
336336 ):
@@ -339,7 +339,7 @@ def test_receive_failing_over_and_failed_over_push_notification(
339339
340340 """
341341 logging .info ("Creating one connection in the pool." )
342- conn = client_maint_events .connection_pool .get_connection ()
342+ conn = client_maint_notifications .connection_pool .get_connection ()
343343
344344 logging .info ("Executing failover command..." )
345345 failover_thread = Thread (
@@ -351,24 +351,24 @@ def test_receive_failing_over_and_failed_over_push_notification(
351351
352352 logging .info ("Waiting for FAILING_OVER push notifications..." )
353353 ClientValidations .wait_push_notification (
354- client_maint_events , timeout = FAILOVER_TIMEOUT , connection = conn
354+ client_maint_notifications , timeout = FAILOVER_TIMEOUT , connection = conn
355355 )
356356
357357 logging .info ("Validating connection maintenance state..." )
358358 assert conn .maintenance_state == MaintenanceState .MAINTENANCE
359- assert conn ._sock .gettimeout () == RELAX_TIMEOUT
359+ assert conn ._sock .gettimeout () == RELAXED_TIMEOUT
360360
361361 logging .info ("Waiting for FAILED_OVER push notifications..." )
362362 ClientValidations .wait_push_notification (
363- client_maint_events , timeout = FAILOVER_TIMEOUT , connection = conn
363+ client_maint_notifications , timeout = FAILOVER_TIMEOUT , connection = conn
364364 )
365365
366366 logging .info ("Validating connection default states is restored..." )
367367 assert conn .maintenance_state == MaintenanceState .NONE
368368 assert conn ._sock .gettimeout () == CLIENT_TIMEOUT
369369
370370 logging .info ("Releasing connection back to the pool..." )
371- client_maint_events .connection_pool .release (conn )
371+ client_maint_notifications .connection_pool .release (conn )
372372
373373 failover_thread .join ()
374374
@@ -675,7 +675,7 @@ def test_old_connection_shutdown_during_moving(
675675 # and connected to the new address
676676 endpoint_type = EndpointType .EXTERNAL_IP
677677 logging .info ("Testing old connection shutdown during MOVING" )
678- client = _get_client_maint_events (
678+ client = _get_client_maint_notifications (
679679 endpoints_config = endpoints_config , endpoint_type = endpoint_type
680680 )
681681
@@ -753,12 +753,12 @@ def execute_commands(moving_event: threading.Event, errors: Queue):
753753 if conn ._sock is not None :
754754 assert conn .get_resolved_ip () == conn .host
755755 assert conn .maintenance_state == MaintenanceState .MOVING
756- assert conn ._sock .gettimeout () == RELAX_TIMEOUT
756+ assert conn ._sock .gettimeout () == RELAXED_TIMEOUT
757757 assert conn .host != conn .orig_host_address
758758 assert not conn .should_reconnect ()
759759 else :
760760 assert conn .maintenance_state == MaintenanceState .MOVING
761- assert conn .socket_timeout == RELAX_TIMEOUT
761+ assert conn .socket_timeout == RELAXED_TIMEOUT
762762 assert conn .host != conn .orig_host_address
763763 assert not conn .should_reconnect ()
764764
@@ -831,7 +831,7 @@ def test_new_connections_receive_moving(
831831
832832 endpoint_type = EndpointType .EXTERNAL_IP
833833 # create new client with new pool that should also receive the moving event
834- new_client = _get_client_maint_events (
834+ new_client = _get_client_maint_notifications (
835835 endpoints_config = endpoints_config ,
836836 endpoint_type = endpoint_type ,
837837 host_config = old_address ,
0 commit comments