From e1c7e8d7670e70795a945d5f31273f5ef9937e31 Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Wed, 3 Jul 2024 12:08:42 -0400 Subject: [PATCH] Add RetryHelper to AIA test --- .../RevocationTests/AiaTests.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs index bd4ee0727a412a..d13255409a8308 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs @@ -76,16 +76,18 @@ public static void AiaAcceptsCertTypesAndIgnoresNonCertTypes(AiaResponseKind aia { responder.AiaResponseKind = aiaResponseKind; - using (ChainHolder holder = new ChainHolder()) - { - X509Chain chain = holder.Chain; - chain.ChainPolicy.CustomTrustStore.Add(rootCert); - chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust; - chain.ChainPolicy.VerificationTime = endEntity.NotBefore.AddMinutes(1); - chain.ChainPolicy.UrlRetrievalTimeout = DynamicRevocationTests.s_urlRetrievalLimit; + RetryHelper.Execute(() => { + using (ChainHolder holder = new ChainHolder()) + { + X509Chain chain = holder.Chain; + chain.ChainPolicy.CustomTrustStore.Add(rootCert); + chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust; + chain.ChainPolicy.VerificationTime = endEntity.NotBefore.AddMinutes(1); + chain.ChainPolicy.UrlRetrievalTimeout = DynamicRevocationTests.s_urlRetrievalLimit; - Assert.NotEqual(mustIgnore, chain.Build(endEntity)); - } + Assert.NotEqual(mustIgnore, chain.Build(endEntity)); + } + }); } }