Skip to content

Commit 3f97767

Browse files
authored
fix: Subtract a second when listening in TestWorkspaceBuildLogs (#2588)
This allowed a test flake seen here: https://github.com/coder/coder/runs/7009119403?check_suite_focus=true#step:9:151
1 parent cfbda57 commit 3f97767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/workspacebuilds_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func TestWorkspaceBuildLogs(t *testing.T) {
325325
workspace := coderdtest.CreateWorkspace(t, client, user.OrganizationID, template.ID)
326326
ctx, cancelFunc := context.WithCancel(context.Background())
327327
t.Cleanup(cancelFunc)
328-
logs, err := client.WorkspaceBuildLogsAfter(ctx, workspace.LatestBuild.ID, before)
328+
logs, err := client.WorkspaceBuildLogsAfter(ctx, workspace.LatestBuild.ID, before.Add(-time.Second))
329329
require.NoError(t, err)
330330
for {
331331
log, ok := <-logs

0 commit comments

Comments
 (0)