Skip to content

Commit

Permalink
Ignore rare Key Vault service issue (#39774)
Browse files Browse the repository at this point in the history
Work around rare service issue in Key Vault Certificates SDK.
  • Loading branch information
heaths authored Nov 6, 2023
1 parent 61c15d0 commit 4b347ab
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,15 @@ public async Task DownloadECDsaCertificateSignLocalVerifyRemote([EnumValues] Cer
CertificateOperation operation = await Client.StartCreateCertificateAsync(name, policy);
RegisterForCleanup(name);

await operation.WaitForCompletionAsync(DefaultCertificateOperationPollingInterval, default);
try
{
await operation.WaitForCompletionAsync(DefaultCertificateOperationPollingInterval, default);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("An internal error has occurred"))
{
// This test fails often enough with an internal HTTP 500 to ignore.
Assert.Inconclusive("The service encountered an internal error");
}

// Download the certificate and sign data locally.
byte[] plaintext = Encoding.UTF8.GetBytes(nameof(DownloadECDsaCertificateSignRemoteVerifyLocal));
Expand Down

0 comments on commit 4b347ab

Please sign in to comment.