Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffb8df9

Browse files
authored
test: Disable error on agent log in scaletest/reconnectingpty (#5445)
They way the reconnectingpty tests behave inherently will cause the agent to occasionally log an error (e.g. due to test disconnecting at a certain time), allowing these error logs to fail the test will cause these tests to be flakey. It's best for these tests to only rely on the observed behavior.
1 parent e2aec27 commit ffb8df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaletest/reconnectingpty/run_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func setupRunnerTest(t *testing.T) (client *codersdk.Client, agentID uuid.UUID)
281281
agentClient.SetSessionToken(authToken)
282282
agentCloser := agent.New(agent.Options{
283283
Client: agentClient,
284-
Logger: slogtest.Make(t, nil).Named("agent"),
284+
Logger: slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Named("agent"),
285285
})
286286
t.Cleanup(func() {
287287
_ = agentCloser.Close()

0 commit comments

Comments
 (0)