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 <alex.scheel@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
This commit is contained in:
Alexander Scheel 2022-09-27 17:44:27 -04:00 committed by GitHub
parent c746befced
commit f463b3d3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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")