Skip to content

Commit 57403a5

Browse files
sfc-gh-mmishchenkosfc-gh-pczajka
authored andcommitted
SNOW-2048239 revert zero timeout for oscp cache lock (#2283)
1 parent 850d001 commit 57403a5

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/snowflake/connector/ocsp_snowflake.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def _deserialize(cls, opened_fd) -> _OCSPResponseValidationResultCache:
231231
OCSPResponseValidationResult,
232232
] = _OCSPResponseValidationResultCache(
233233
entry_lifetime=constants.DAY_IN_SECONDS,
234-
file_timeout=60.0,
235234
file_path={
236235
"linux": os.path.join(
237236
"~", ".cache", "snowflake", "ocsp_response_validation_cache.json"

test/unit/test_ocsp.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ def test_ocsp_bad_validity():
342342
del environ["SF_TEST_OCSP_FORCE_BAD_RESPONSE_VALIDITY"]
343343

344344

345-
@pytest.mark.flaky(reruns=3)
346345
def test_ocsp_single_endpoint():
347346
environ["SF_OCSP_ACTIVATE_NEW_ENDPOINT"] = "True"
348347
SnowflakeOCSP.clear_cache()
@@ -366,7 +365,6 @@ def test_ocsp_by_post_method():
366365
assert ocsp.validate(url, connection), f"Failed to validate: {url}"
367366

368367

369-
@pytest.mark.flaky(reruns=3)
370368
def test_ocsp_with_file_cache(tmpdir):
371369
"""OCSP tests and the cache server and file."""
372370
tmp_dir = str(tmpdir.mkdir("ocsp_response_cache"))
@@ -380,7 +378,6 @@ def test_ocsp_with_file_cache(tmpdir):
380378
assert ocsp.validate(url, connection), f"Failed to validate: {url}"
381379

382380

383-
@pytest.mark.flaky(reruns=3)
384381
@pytest.mark.skipolddriver
385382
def test_ocsp_with_bogus_cache_files(tmpdir, random_ocsp_response_validation_cache):
386383
with mock.patch(
@@ -420,7 +417,6 @@ def test_ocsp_with_bogus_cache_files(tmpdir, random_ocsp_response_validation_cac
420417
)
421418

422419

423-
@pytest.mark.flaky(reruns=3)
424420
@pytest.mark.skipolddriver
425421
def test_ocsp_with_outdated_cache(tmpdir, random_ocsp_response_validation_cache):
426422
with mock.patch(
@@ -481,7 +477,6 @@ def _store_cache_in_file(tmpdir, target_hosts=None):
481477
return filename, target_hosts
482478

483479

484-
@pytest.mark.flaky(reruns=3)
485480
def test_ocsp_with_invalid_cache_file():
486481
"""OCSP tests with an invalid cache file."""
487482
SnowflakeOCSP.clear_cache() # reset the memory cache
@@ -533,7 +528,6 @@ def test_ocsp_cache_when_server_is_down(tmpdir):
533528
), "OCSP validation should succeed with fail-open when server is down"
534529

535530

536-
@pytest.mark.flaky(reruns=3)
537531
def test_concurrent_ocsp_requests(tmpdir):
538532
"""Run OCSP revocation checks in parallel. The memory and file caches are deleted randomly."""
539533
cache_file_name = path.join(str(tmpdir), "cache_file.txt")
@@ -578,7 +572,6 @@ def test_ocsp_revoked_certificate():
578572
assert ex.value.errno == ex.value.errno == ER_OCSP_RESPONSE_CERT_STATUS_REVOKED
579573

580574

581-
@pytest.mark.flaky(reruns=3)
582575
def test_ocsp_incomplete_chain():
583576
"""Tests incomplete chained certificate."""
584577
incomplete_chain_cert = path.join(

0 commit comments

Comments
 (0)