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: fix Test_Runner/CleanupPendingBuild with testutil.Eventually#19924

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 1 commit intomainfromcj/flake/Test_Runner/CleanupPendingBuild
Sep 23, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletionsscaletest/createworkspaces/run_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,7 +264,7 @@ func Test_Runner(t *testing.T) {
// Wait for the workspace build job to be picked up.
checkJobStartedCtx := testutil.Context(t, testutil.WaitLong)
jobCh := make(chan codersdk.ProvisionerJob, 1)
require.Eventually(t, func() bool {
testutil.Eventually(checkJobStartedCtx,t, func(ctx context.Context) bool {
workspaces, err := client.Workspaces(checkJobStartedCtx, codersdk.WorkspaceFilter{})
if err != nil {
return false
Expand All@@ -286,7 +286,7 @@ func Test_Runner(t *testing.T) {
}
jobCh <- ws.LatestBuild.Job
return true
}, testutil.WaitLong, testutil.IntervalSlow)
}, testutil.IntervalSlow)

t.Log("canceling scaletest workspace creation")
runnerCancel()
Expand All@@ -308,9 +308,8 @@ func Test_Runner(t *testing.T) {
}()

// Ensure the job has been marked as canceled
checkJobCanceledCtx := testutil.Context(t, testutil.WaitLong)
require.Eventually(t, func() bool {
pj, err := client.OrganizationProvisionerJob(checkJobCanceledCtx, runningJob.OrganizationID, runningJob.ID)
testutil.Eventually(cleanupCtx, t, func(ctx context.Context) bool {
pj, err := client.OrganizationProvisionerJob(ctx, runningJob.OrganizationID, runningJob.ID)
if !assert.NoError(t, err) {
return false
}
Expand All@@ -324,7 +323,7 @@ func Test_Runner(t *testing.T) {
}

return true
}, testutil.WaitLong, testutil.IntervalSlow)
}, testutil.IntervalSlow)
cleanupCancel()
<-done
cleanupLogsStr := cleanupLogs.String()
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp