Skip to content

test bug: coderd/TestPatchCancelTemplateVersion/Success #3083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnstcn opened this issue Jul 21, 2022 · 0 comments · Fixed by #3085
Closed

test bug: coderd/TestPatchCancelTemplateVersion/Success #3083

johnstcn opened this issue Jul 21, 2022 · 0 comments · Fixed by #3085
Assignees
Labels
api Area: HTTP API

Comments

@johnstcn
Copy link
Member

johnstcn commented Jul 21, 2022

In this unit test we check that the template verison job status is canceled but we do not assert that the error is nil when in fact we timed out cancelling the job. Seems related to the low value (25ms) of ForceCancelInterval in coderdtest.NewProvisionerDaemon.
This tripped us up when in #3061, so filing a follow-up issue for this.

image

EDIT: see also coderd/TestPatchCancelWorkspaceBuild

@johnstcn johnstcn self-assigned this Jul 21, 2022
@johnstcn johnstcn added api Area: HTTP API flake labels Jul 21, 2022
johnstcn added a commit that referenced this issue Jul 21, 2022
Two coderd unit tests (TestPatchCancelTemplateVersion/Success and TestPatchCancelWorkspaceBuild) implied erroneously that the job was canceled successfully.

This is not the case, as these unit tests do not include a Provision_Complete response in the input to the
echo provisioner. Now explicitly checking the job error and bumping the force cancel interval to be longer.

Fixes #3083.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant