Skip to content

Commit

Permalink
Update OCSP responder integration test timeout (#1341)
Browse files Browse the repository at this point in the history
We've been getting some infrequent OCSP responder integration test
failures. This updates the timeout during the OCSP responder ping to
see if this lowers our failure rate.
  • Loading branch information
samuel40791765 authored Dec 6, 2023
1 parent b9f084b commit a987a83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions crypto/ocsp/ocsp_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,19 @@ static OCSP_RESPONSE *GetOCSPResponse(const char *ocsp_responder_host,
ocsp_responder_host ? ocsp_responder_host : host);
OCSP_REQ_CTX_set1_req(ocsp_ctx.get(), request);

// Try connecting to the OCSP responder endpoint with a timeout of 3 seconds.
// Try connecting to the OCSP responder endpoint with a timeout of 8 seconds.
// Sends out an OCSP request and expects an OCSP response.
//
// Note: The OCSP responder times out occsasionally, which results in
// arbitrary test failues. We can adjust |timeout| accordingly when these
// happen too often.
OCSP_RESPONSE *resp = nullptr;
time_t start_time = time(nullptr);
double timeout = 3;
double timeout = 8;
int rv;
do {
rv = OCSP_sendreq_nbio(&resp, ocsp_ctx.get());
} while ((rv == -1) && difftime(time(nullptr), start_time) < timeout);
} while (rv == -1 && difftime(time(nullptr), start_time) < timeout);

OPENSSL_free(host);
return resp;
Expand Down
3 changes: 2 additions & 1 deletion util/all_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
"shard": true
},
{
"cmd": ["ssl/integration_test"]
"cmd": ["ssl/integration_test"],
"skip_sde": true
},
{
"cmd": ["crypto/mem_test"]
Expand Down

0 comments on commit a987a83

Please sign in to comment.