Skip to content

Commit f118679

Browse files
committed
reduce timeout
1 parent c304696 commit f118679

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

coderd/autobuild/executor/lifecycle_executor_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ func mustTransitionWorkspace(t *testing.T, client *codersdk.Client, workspaceID
503503
}
504504

505505
func mustWorkspace(t *testing.T, client *codersdk.Client, workspaceID uuid.UUID) codersdk.Workspace {
506+
t.Helper()
506507
ctx := context.Background()
507508
ws, err := client.Workspace(ctx, workspaceID)
508509
if err != nil && strings.Contains(err.Error(), "status code 410") {
@@ -513,6 +514,7 @@ func mustWorkspace(t *testing.T, client *codersdk.Client, workspaceID uuid.UUID)
513514
}
514515

515516
func assertLatestTransitionWithEventualBuild(t *testing.T, client *codersdk.Client, workspace codersdk.Workspace, expected codersdk.WorkspaceTransition) {
517+
t.Helper()
516518
assert.Eventually(t, func() bool {
517519
ws := mustWorkspace(t, client, workspace.ID)
518520
if ws.LatestBuild.ID == workspace.LatestBuild.ID {
@@ -523,10 +525,11 @@ func assertLatestTransitionWithEventualBuild(t *testing.T, client *codersdk.Clie
523525
}
524526
// At this point a build has happened. Is it what we want?
525527
return assert.Equal(t, expected, ws.LatestBuild.Transition)
526-
}, 5*time.Second, 25*time.Millisecond)
528+
}, 3*time.Second, 25*time.Millisecond)
527529
}
528530

529531
func assertLatestTransitionWithNoEventualBuild(t *testing.T, client *codersdk.Client, workspace codersdk.Workspace, expected codersdk.WorkspaceTransition) {
532+
t.Helper()
530533
assert.Never(t, func() bool {
531534
ws := mustWorkspace(t, client, workspace.ID)
532535
if ws.LatestBuild.ID == workspace.LatestBuild.ID {
@@ -537,7 +540,7 @@ func assertLatestTransitionWithNoEventualBuild(t *testing.T, client *codersdk.Cl
537540
}
538541
// At this point a build should not have happened. Is the state still as expected?
539542
return assert.Equal(t, expected, ws.LatestBuild.Transition)
540-
}, 5*time.Second, 25*time.Millisecond)
543+
}, 3*time.Second, 25*time.Millisecond)
541544
}
542545

543546
func TestMain(m *testing.M) {

0 commit comments

Comments
 (0)