3efa7bdcc2
This fixes some rare test flakes caused by a data race inherent in the way we use `assert.Eventually()` with extra variables for followup assertions. This function is tricky to use correctly because it runs the passed function in a separate goroutine, and you have no guarantee that any shared variables are in a coherent state when the `assert.Eventually()` call returns. Even if you add manual mutexes, it's tricky to get the semantics right. This has been a recurring pain point and the cause of several test flakes. This change introduces a new `library.RequireEventually()` that works by internally constructing a per-loop `*require.Assertions` and running everything on a single goroutine (using `wait.PollImmediate()`). This makes it very easy to write eventual assertions. Signed-off-by: Matt Moyer <moyerm@vmware.com> |
||
---|---|---|
.. | ||
category_test.go | ||
cli_test.go | ||
concierge_api_serving_certs_test.go | ||
concierge_availability_test.go | ||
concierge_client_test.go | ||
concierge_credentialissuer_test.go | ||
concierge_credentialrequest_test.go | ||
concierge_impersonation_proxy_test.go | ||
concierge_kubecertagent_test.go | ||
concierge_kubectl_test.go | ||
e2e_test.go | ||
kube_api_discovery_test.go | ||
kubeclient_test.go | ||
ldap_client_test.go | ||
rbac_test.go | ||
supervisor_discovery_test.go | ||
supervisor_healthz_test.go | ||
supervisor_login_test.go | ||
supervisor_secrets_test.go | ||
supervisor_storage_garbage_collection_test.go | ||
supervisor_storage_test.go | ||
supervisor_upstream_test.go | ||
whoami_test.go |