chore: fix lengthy tests in psql (#7545)

* chore: fix lengthy tests in psql

This was adding at a minimum 3mins to our psql tests!

* fix: automatically cancel tests on cleanup
This commit is contained in:
Kyle Carberry
2023-05-17 11:26:53 -05:00
committed by GitHub
parent d1b1122690
commit 6e7175b589
5 changed files with 15 additions and 7 deletions

View File

@ -31,7 +31,7 @@ import (
// forceWorkspaceProxyHealthUpdate forces an update of the proxy health.
// This is useful when a proxy is created or deleted. Errors will be logged.
func (api *API) forceWorkspaceProxyHealthUpdate(ctx context.Context) {
if err := api.ProxyHealth.ForceUpdate(ctx); err != nil {
if err := api.ProxyHealth.ForceUpdate(ctx); err != nil && !xerrors.Is(err, context.Canceled) {
api.Logger.Error(ctx, "force proxy health update", slog.Error(err))
}
}