2626from aws_advanced_python_wrapper .host_list_provider import RdsHostListProvider
2727from aws_advanced_python_wrapper .sql_alchemy_connection_provider import \
2828 SqlAlchemyPooledConnectionProvider
29+ from aws_advanced_python_wrapper .utils .log import Logger
2930from aws_advanced_python_wrapper .utils .properties import (Properties ,
3031 WrapperProperties )
3132from tests .integration .container .utils .conditions import (
5152 TestEnvironmentFeatures .BLUE_GREEN_DEPLOYMENT ,
5253 TestEnvironmentFeatures .PERFORMANCE ])
5354class TestReadWriteSplitting :
55+
56+ logger = Logger (__name__ )
57+
58+ @pytest .fixture (autouse = True )
59+ def setup_method (self , request ):
60+ self .logger .info (f"Starting test: { request .node .name } " )
61+ yield
62+ self .logger .info (f"Ending test: { request .node .name } " )
63+
5464 @pytest .fixture (scope = 'class' )
5565 def rds_utils (self ):
5666 region : str = TestEnvironment .get_current ().get_info ().get_region ()
@@ -64,20 +74,7 @@ def clear_caches(self):
6474
6575 @pytest .fixture (scope = 'class' )
6676 def props (self ):
67- p : Properties = Properties ({"plugins" : "read_write_splitting" , "connect_timeout" : 30 , "autocommit" : True })
68-
69- if TestEnvironmentFeatures .TELEMETRY_TRACES_ENABLED in TestEnvironment .get_current ().get_features () \
70- or TestEnvironmentFeatures .TELEMETRY_METRICS_ENABLED in TestEnvironment .get_current ().get_features ():
71- WrapperProperties .ENABLE_TELEMETRY .set (p , "True" )
72- WrapperProperties .TELEMETRY_SUBMIT_TOPLEVEL .set (p , "True" )
73-
74- if TestEnvironmentFeatures .TELEMETRY_TRACES_ENABLED in TestEnvironment .get_current ().get_features ():
75- WrapperProperties .TELEMETRY_TRACES_BACKEND .set (p , "XRAY" )
76-
77- if TestEnvironmentFeatures .TELEMETRY_METRICS_ENABLED in TestEnvironment .get_current ().get_features ():
78- WrapperProperties .TELEMETRY_METRICS_BACKEND .set (p , "OTLP" )
79-
80- return p
77+ return Properties ({"plugins" : "read_write_splitting" , "socket_timeout" : 10 , "connect_timeout" : 10 , "autocommit" : True })
8178
8279 @pytest .fixture (scope = 'class' )
8380 def failover_props (self ):
0 commit comments