Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: reduce execution time of TestProvisionerJobs#19475

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 4 commits intomainfromcj/cli-testprovisionerjobs-speedup
Aug 22, 2025

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedAug 21, 2025
edited
Loading

Note: this commit was partially authored by AI.

  • Replaces coderdtest.CreateTemplate/TemplateVersion() with direct dbgen calls. We do not need a fully functional template for these tests.
  • Removes provisioner daemon creation/cleanup. We do not need a running provisioner daemon here; this functionality is tested elsewhere.
  • Simplifies provisioner job creation test helpers.

This reduces the test runtime by over 50%:

Old:

time go test -count=100 ./cli -test.run=TestProvisionerJobsok      github.com/coder/coder/v2/cli   50.149s

New:

time go test -count=100 ./cli -test.run=TestProvisionerJobsok      github.com/coder/coder/v2/cli   21.898

@johnstcnjohnstcnforce-pushed thecj/cli-testprovisionerjobs-speedup branch from7cd2af7 to3fb9788CompareAugust 22, 2025 11:26
returnjob
}

prepareTemplateVersionImportJobBuilder:=func(t*testing.T,dryRunbool) database.ProvisionerJob {
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Review: it's simpler to have separate test helpers instead of one with a control flag.

@johnstcnjohnstcn merged commit5e49d8c intomainAug 22, 2025
26 of 27 checks passed
@johnstcnjohnstcn deleted the cj/cli-testprovisionerjobs-speedup branchAugust 22, 2025 12:40
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@DanielleMaywoodDanielleMaywoodAwaiting requested review from DanielleMaywood

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@johnstcn@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp