@@ -257,6 +257,7 @@ def test_ocsp_bad_validity():
257257 del environ ["SF_TEST_OCSP_FORCE_BAD_RESPONSE_VALIDITY" ]
258258
259259
260+ @pytest .mark .flaky (reruns = 3 )
260261def test_ocsp_single_endpoint ():
261262 environ ["SF_OCSP_ACTIVATE_NEW_ENDPOINT" ] = "True"
262263 SnowflakeOCSP .clear_cache ()
@@ -280,6 +281,7 @@ def test_ocsp_by_post_method():
280281 assert ocsp .validate (url , connection ), f"Failed to validate: { url } "
281282
282283
284+ @pytest .mark .flaky (reruns = 3 )
283285def test_ocsp_with_file_cache (tmpdir ):
284286 """OCSP tests and the cache server and file."""
285287 tmp_dir = str (tmpdir .mkdir ("ocsp_response_cache" ))
@@ -293,6 +295,7 @@ def test_ocsp_with_file_cache(tmpdir):
293295 assert ocsp .validate (url , connection ), f"Failed to validate: { url } "
294296
295297
298+ @pytest .mark .flaky (reruns = 3 )
296299@pytest .mark .skipolddriver
297300def test_ocsp_with_bogus_cache_files (tmpdir , random_ocsp_response_validation_cache ):
298301 with mock .patch (
@@ -332,6 +335,7 @@ def test_ocsp_with_bogus_cache_files(tmpdir, random_ocsp_response_validation_cac
332335 )
333336
334337
338+ @pytest .mark .flaky (reruns = 3 )
335339@pytest .mark .skipolddriver
336340def test_ocsp_with_outdated_cache (tmpdir , random_ocsp_response_validation_cache ):
337341 with mock .patch (
@@ -392,6 +396,7 @@ def _store_cache_in_file(tmpdir, target_hosts=None):
392396 return filename , target_hosts
393397
394398
399+ @pytest .mark .flaky (reruns = 3 )
395400def test_ocsp_with_invalid_cache_file ():
396401 """OCSP tests with an invalid cache file."""
397402 SnowflakeOCSP .clear_cache () # reset the memory cache
@@ -401,6 +406,7 @@ def test_ocsp_with_invalid_cache_file():
401406 assert ocsp .validate (url , connection ), f"Failed to validate: { url } "
402407
403408
409+ @pytest .mark .flaky (reruns = 3 )
404410@mock .patch (
405411 "snowflake.connector.ocsp_snowflake.SnowflakeOCSP._fetch_ocsp_response" ,
406412 side_effect = BrokenPipeError ("fake error" ),
@@ -423,6 +429,7 @@ def test_ocsp_cache_when_server_is_down(
423429 assert not cache_data , "no cache should present because of broken pipe"
424430
425431
432+ @pytest .mark .flaky (reruns = 3 )
426433def test_concurrent_ocsp_requests (tmpdir ):
427434 """Run OCSP revocation checks in parallel. The memory and file caches are deleted randomly."""
428435 cache_file_name = path .join (str (tmpdir ), "cache_file.txt" )
@@ -467,6 +474,7 @@ def test_ocsp_revoked_certificate():
467474 assert ex .value .errno == ex .value .errno == ER_OCSP_RESPONSE_CERT_STATUS_REVOKED
468475
469476
477+ @pytest .mark .flaky (reruns = 3 )
470478def test_ocsp_incomplete_chain ():
471479 """Tests incomplete chained certificate."""
472480 incomplete_chain_cert = path .join (
0 commit comments