@@ -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" : 30 ,
87+ "connect_timeout" : 10 ,
88+ "autocommit" : True
89+ }
8690
8791 @pytest .fixture (scope = 'class' )
8892 def proxied_props (self , props , conn_utils ):
@@ -349,15 +353,13 @@ def test_failover_to_new_writer__switch_read_only(
349353 current_id = rds_utils .query_instance_id (conn )
350354 assert new_writer_id == current_id
351355
352- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring_v2" ])
353356 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
354357 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
355358 @enable_on_num_instances (min_instances = 3 )
356359 @disable_on_engines ([DatabaseEngine .MYSQL ])
357360 def test_failover_to_new_reader__switch_read_only (
358361 self , test_environment : TestEnvironment , test_driver : TestDriver ,
359- proxied_failover_props , conn_utils , rds_utils , plugins ):
360- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
362+ proxied_failover_props , conn_utils , rds_utils ):
361363 WrapperProperties .FAILOVER_MODE .set (proxied_failover_props , "reader-or-writer" )
362364
363365 target_driver_connect = DriverHelper .get_connect_func (test_driver )
@@ -398,16 +400,13 @@ def test_failover_to_new_reader__switch_read_only(
398400 current_id = rds_utils .query_instance_id (conn )
399401 assert other_reader_id == current_id
400402
401- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
402- "read_write_splitting,failover,host_monitoring_v2" ])
403403 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
404404 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
405405 @enable_on_num_instances (min_instances = 3 )
406406 @disable_on_engines ([DatabaseEngine .MYSQL ])
407407 def test_failover_reader_to_writer__switch_read_only (
408408 self , test_environment : TestEnvironment , test_driver : TestDriver ,
409- proxied_failover_props , conn_utils , rds_utils , plugins ):
410- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
409+ proxied_failover_props , conn_utils , rds_utils ):
411410 target_driver_connect = DriverHelper .get_connect_func (test_driver )
412411 with AwsWrapperConnection .connect (
413412 target_driver_connect , ** conn_utils .get_proxy_connect_params (), ** proxied_failover_props ) as conn :
@@ -519,19 +518,16 @@ def test_pooled_connection__cluster_url_failover(
519518 new_driver_conn = conn .target_connection
520519 assert initial_driver_conn is not new_driver_conn
521520
522- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
523- "read_write_splitting,failover,host_monitoring_v2" ])
524521 @enable_on_features ([TestEnvironmentFeatures .FAILOVER_SUPPORTED , TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
525522 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
526523 @disable_on_engines ([DatabaseEngine .MYSQL ])
527524 def test_pooled_connection__failover_failed (
528525 self , test_environment : TestEnvironment , test_driver : TestDriver ,
529- rds_utils , conn_utils , proxied_failover_props , plugins ):
526+ rds_utils , conn_utils , proxied_failover_props ):
530527 writer_host = test_environment .get_writer ().get_host ()
531528 provider = SqlAlchemyPooledConnectionProvider (lambda _ , __ : {"pool_size" : 1 }, None , lambda host_info , props : writer_host in host_info .host )
532529 ConnectionProviderManager .set_connection_provider (provider )
533530
534- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
535531 WrapperProperties .FAILOVER_TIMEOUT_SEC .set (proxied_failover_props , "1" )
536532 WrapperProperties .FAILURE_DETECTION_TIME_MS .set (proxied_failover_props , "1000" )
537533 WrapperProperties .FAILURE_DETECTION_COUNT .set (proxied_failover_props , "1" )
0 commit comments