validator: Fix flaky test TestServer_RefreshJWTSecretOnFileChange (#10296)

This commit is contained in:
Preston Van Loon 2022-03-01 14:34:05 -06:00 committed by GitHub
parent d64f6cb7a8
commit a3f8ccd924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,9 @@ func TestServer_RefreshJWTSecretOnFileChange(t *testing.T) {
defer cancel()
go srv.refreshAuthTokenFromFileChanges(ctx, authTokenPath)
// Wait for service to be ready.
time.Sleep(time.Millisecond * 250)
// Update the auth token file with a new secret.
require.NoError(t, CreateAuthToken(walletDir, "localhost:7500"))