@@ -82,7 +82,11 @@ def props(self):
8282 @pytest .fixture (scope = 'class' )
8383 def failover_props (self ):
8484 return {
85- "plugins" : "read_write_splitting,failover" , "connect_timeout" : 10 , "autocommit" : True }
85+ "plugins" : "read_write_splitting,failover" ,
86+ "socket_timeout" : 10 ,
87+ "connect_timeout" : 10 ,
88+ "autocommit" : True
89+ }
8690
8791 @pytest .fixture (scope = 'class' )
8892 def proxied_props (self , props , conn_utils ):
@@ -317,9 +321,6 @@ def test_failover_to_new_writer__switch_read_only(
317321 target_driver_connect = DriverHelper .get_connect_func (test_driver )
318322 connect_params = conn_utils .get_proxy_connect_params ()
319323
320- # To prevent endless waiting while executing SQL queries
321- WrapperProperties .SOCKET_TIMEOUT_SEC .set (connect_params , 10 )
322-
323324 with AwsWrapperConnection .connect (target_driver_connect , ** connect_params , ** proxied_failover_props ) as conn :
324325 original_writer_id = rds_utils .query_instance_id (conn )
325326
@@ -349,15 +350,13 @@ def test_failover_to_new_writer__switch_read_only(
349350 current_id = rds_utils .query_instance_id (conn )
350351 assert new_writer_id == current_id
351352
352- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring_v2" ])
353353 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
354354 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
355355 @enable_on_num_instances (min_instances = 3 )
356356 @disable_on_engines ([DatabaseEngine .MYSQL ])
357357 def test_failover_to_new_reader__switch_read_only (
358358 self , test_environment : TestEnvironment , test_driver : TestDriver ,
359- proxied_failover_props , conn_utils , rds_utils , plugins ):
360- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
359+ proxied_failover_props , conn_utils , rds_utils ):
361360 WrapperProperties .FAILOVER_MODE .set (proxied_failover_props , "reader-or-writer" )
362361
363362 target_driver_connect = DriverHelper .get_connect_func (test_driver )
@@ -398,16 +397,13 @@ def test_failover_to_new_reader__switch_read_only(
398397 current_id = rds_utils .query_instance_id (conn )
399398 assert other_reader_id == current_id
400399
401- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
402- "read_write_splitting,failover,host_monitoring_v2" ])
403400 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
404401 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
405402 @enable_on_num_instances (min_instances = 3 )
406403 @disable_on_engines ([DatabaseEngine .MYSQL ])
407404 def test_failover_reader_to_writer__switch_read_only (
408405 self , test_environment : TestEnvironment , test_driver : TestDriver ,
409- proxied_failover_props , conn_utils , rds_utils , plugins ):
410- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
406+ proxied_failover_props , conn_utils , rds_utils ):
411407 target_driver_connect = DriverHelper .get_connect_func (test_driver )
412408 with AwsWrapperConnection .connect (
413409 target_driver_connect , ** conn_utils .get_proxy_connect_params (), ** proxied_failover_props ) as conn :
@@ -519,19 +515,16 @@ def test_pooled_connection__cluster_url_failover(
519515 new_driver_conn = conn .target_connection
520516 assert initial_driver_conn is not new_driver_conn
521517
522- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
523- "read_write_splitting,failover,host_monitoring_v2" ])
524518 @enable_on_features ([TestEnvironmentFeatures .FAILOVER_SUPPORTED , TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
525519 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
526520 @disable_on_engines ([DatabaseEngine .MYSQL ])
527521 def test_pooled_connection__failover_failed (
528522 self , test_environment : TestEnvironment , test_driver : TestDriver ,
529- rds_utils , conn_utils , proxied_failover_props , plugins ):
523+ rds_utils , conn_utils , proxied_failover_props ):
530524 writer_host = test_environment .get_writer ().get_host ()
531525 provider = SqlAlchemyPooledConnectionProvider (lambda _ , __ : {"pool_size" : 1 }, None , lambda host_info , props : writer_host in host_info .host )
532526 ConnectionProviderManager .set_connection_provider (provider )
533527
534- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
535528 WrapperProperties .FAILOVER_TIMEOUT_SEC .set (proxied_failover_props , "1" )
536529 WrapperProperties .FAILURE_DETECTION_TIME_MS .set (proxied_failover_props , "1000" )
537530 WrapperProperties .FAILURE_DETECTION_COUNT .set (proxied_failover_props , "1" )
0 commit comments