Skip to content

Commit 665cd3a

Browse files
committed
try getting more insight in what's the reason behind mock leaking to other functions
1 parent c3179ad commit 665cd3a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/snowflake/connector/ocsp_snowflake.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,12 @@ def _check_ocsp_response_cache_server(
14121412

14131413
def _lazy_read_ca_bundle(self) -> None:
14141414
"""Reads the local cabundle file and cache it in memory."""
1415+
if type(self._root_certs_dict_lock_timeout) is not int:
1416+
logger.warning(
1417+
"_root_certs_dict_lock_timeout is not an integer. %s",
1418+
self._root_certs_dict_lock_timeout,
1419+
)
1420+
14151421
SnowflakeOCSP.ROOT_CERTIFICATES_DICT_LOCK.acquire(
14161422
timeout=self._root_certs_dict_lock_timeout
14171423
)

test/unit/test_storage_client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from os import path
2-
from unittest.mock import MagicMock, patch
2+
from unittest.mock import MagicMock
33

44
try:
55
from snowflake.connector import SnowflakeConnection
@@ -24,9 +24,6 @@
2424
megabyte = 1024 * 1024
2525

2626

27-
@patch(
28-
"snowflake.connector.ssl_wrap_socket.FEATURE_ROOT_CERTS_DICT_LOCK_TIMEOUT", new=-1
29-
)
3027
def test_status_when_num_of_chunks_is_zero():
3128
meta_info = {
3229
"name": "data1.txt.gz",

0 commit comments

Comments
 (0)