Skip to content

Commit 3f97767

Browse files
authored
fix: Subtract a second when listening in TestWorkspaceBuildLogs (coder#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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy