From f463b3d3e8b293867192cefefe1715730f1d0b54 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 27 Sep 2022 17:44:27 -0400 Subject: [PATCH] Increase sleep to fix CI cert auth test failure (#17332) The periodic function only runs every 50ms, so waiting 60ms means we might not be done fetching the CRL on slower CI systems or with high test parallelism. Tested with: > untilfail -parallel=-9 ../../../cert.test -test.run=TestCRLFetch -test.count=1 -test.v And shown to reliably fail before, fixed after. Signed-off-by: Alexander Scheel Signed-off-by: Alexander Scheel --- builtin/credential/cert/path_crls_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin/credential/cert/path_crls_test.go b/builtin/credential/cert/path_crls_test.go index 0d36c9624..aa293a52c 100644 --- a/builtin/credential/cert/path_crls_test.go +++ b/builtin/credential/cert/path_crls_test.go @@ -185,7 +185,11 @@ func TestCRLFetch(t *testing.T) { crlBytes, err = x509.CreateRevocationList(rand.Reader, revocationListTemplate, caBundle.Certificate, bundle.PrivateKey) crlBytesLock.Unlock() require.NoError(t, err) - time.Sleep(60 * time.Millisecond) + + // Give ourselves a little extra room on slower CI systems to ensure we + // can fetch the new CRL. + time.Sleep(150 * time.Millisecond) + b.crlUpdateMutex.Lock() if len(b.crls["testcrl"].Serials) != 2 { t.Fatalf("wrong number of certs in CRL")