File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
src/snowflake/connector/aio Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ def __init__(
113113 # note we don't call super here because asyncio can not/is not recommended
114114 # to perform async operation in the __init__ while in the sync connection we
115115 # perform connect
116+
117+ # SNOW-2352456: disable endpoint-based platform detection queries for async connection
118+ kwargs ["platform_detection_timeout_seconds" ] = 0.0
119+
116120 self ._conn_parameters = self ._init_connection_parameters (
117121 kwargs , connection_name , connections_file_path
118122 )
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ async def authenticate(
102102 self ._rest ._connection ._login_timeout ,
103103 self ._rest ._connection ._network_timeout ,
104104 self ._rest ._connection ._socket_timeout ,
105+ self ._rest ._connection ._platform_detection_timeout_seconds ,
105106 )
106107
107108 body = copy .deepcopy (body_template )
Original file line number Diff line number Diff line change 5151from snowflake .connector .wif_util import AttestationProvider
5252
5353
54+ @pytest .fixture (autouse = True )
55+ def mock_detect_platforms ():
56+ with patch (
57+ "snowflake.connector.auth._auth.detect_platforms" , return_value = []
58+ ) as mock_detect :
59+ yield mock_detect
60+
61+
5462def fake_connector (** kwargs ) -> snowflake .connector .aio .SnowflakeConnection :
5563 return snowflake .connector .aio .SnowflakeConnection (
5664 user = "user" ,
You can’t perform that action at this time.
0 commit comments