Skip to content

Commit 8a47262

Browse files
authored
fix: ignore logged errors in TestWorkspaceAgent/Timeout
fixes #10167 Annoyingly, there isn't a good way to stop the publish from being sent on shutdown, and subscribing to them in the test is too fragile because empty messages are sent in a bunch of places, so we can't reliably tell it's regarding timeouts.
1 parent a0485c0 commit 8a47262

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/workspaceagents_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ func TestWorkspaceAgent(t *testing.T) {
124124
})
125125
t.Run("Timeout", func(t *testing.T) {
126126
t.Parallel()
127+
// timeouts can cause error logs to be dropped on shutdown
128+
logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Leveled(slog.LevelDebug)
127129
client := coderdtest.New(t, &coderdtest.Options{
128130
IncludeProvisionerDaemon: true,
131+
Logger: &logger,
129132
})
130133
user := coderdtest.CreateFirstUser(t, client)
131134
authToken := uuid.NewString()

0 commit comments

Comments
 (0)