@@ -82,7 +82,13 @@ 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,host_monitoring" ,
86+ "socket_timeout" : 30 ,
87+ "connect_timeout" : 10 ,
88+ "monitoring-connect_timeout" : 5 ,
89+ "monitoring-socket_timeout" : 5 ,
90+ "autocommit" : True
91+ }
8692
8793 @pytest .fixture (scope = 'class' )
8894 def proxied_props (self , props , conn_utils ):
@@ -349,15 +355,13 @@ def test_failover_to_new_writer__switch_read_only(
349355 current_id = rds_utils .query_instance_id (conn )
350356 assert new_writer_id == current_id
351357
352- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring_v2" ])
353358 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
354359 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
355360 @enable_on_num_instances (min_instances = 3 )
356361 @disable_on_engines ([DatabaseEngine .MYSQL ])
357362 def test_failover_to_new_reader__switch_read_only (
358363 self , test_environment : TestEnvironment , test_driver : TestDriver ,
359- proxied_failover_props , conn_utils , rds_utils , plugins ):
360- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
364+ proxied_failover_props , conn_utils , rds_utils ):
361365 WrapperProperties .FAILOVER_MODE .set (proxied_failover_props , "reader-or-writer" )
362366
363367 target_driver_connect = DriverHelper .get_connect_func (test_driver )
@@ -398,16 +402,13 @@ def test_failover_to_new_reader__switch_read_only(
398402 current_id = rds_utils .query_instance_id (conn )
399403 assert other_reader_id == current_id
400404
401- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
402- "read_write_splitting,failover,host_monitoring_v2" ])
403405 @enable_on_features ([TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
404406 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
405407 @enable_on_num_instances (min_instances = 3 )
406408 @disable_on_engines ([DatabaseEngine .MYSQL ])
407409 def test_failover_reader_to_writer__switch_read_only (
408410 self , test_environment : TestEnvironment , test_driver : TestDriver ,
409- proxied_failover_props , conn_utils , rds_utils , plugins ):
410- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
411+ proxied_failover_props , conn_utils , rds_utils ):
411412 target_driver_connect = DriverHelper .get_connect_func (test_driver )
412413 with AwsWrapperConnection .connect (
413414 target_driver_connect , ** conn_utils .get_proxy_connect_params (), ** proxied_failover_props ) as conn :
@@ -519,19 +520,16 @@ def test_pooled_connection__cluster_url_failover(
519520 new_driver_conn = conn .target_connection
520521 assert initial_driver_conn is not new_driver_conn
521522
522- @pytest .mark .parametrize ("plugins" , ["read_write_splitting,failover,host_monitoring" ,
523- "read_write_splitting,failover,host_monitoring_v2" ])
524523 @enable_on_features ([TestEnvironmentFeatures .FAILOVER_SUPPORTED , TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
525524 TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ])
526525 @disable_on_engines ([DatabaseEngine .MYSQL ])
527526 def test_pooled_connection__failover_failed (
528527 self , test_environment : TestEnvironment , test_driver : TestDriver ,
529- rds_utils , conn_utils , proxied_failover_props , plugins ):
528+ rds_utils , conn_utils , proxied_failover_props ):
530529 writer_host = test_environment .get_writer ().get_host ()
531530 provider = SqlAlchemyPooledConnectionProvider (lambda _ , __ : {"pool_size" : 1 }, None , lambda host_info , props : writer_host in host_info .host )
532531 ConnectionProviderManager .set_connection_provider (provider )
533532
534- WrapperProperties .PLUGINS .set (proxied_failover_props , plugins )
535533 WrapperProperties .FAILOVER_TIMEOUT_SEC .set (proxied_failover_props , "1" )
536534 WrapperProperties .FAILURE_DETECTION_TIME_MS .set (proxied_failover_props , "1000" )
537535 WrapperProperties .FAILURE_DETECTION_COUNT .set (proxied_failover_props , "1" )
0 commit comments