From dbda26f16500cd15dc781f9f929d9b2b89e85c1b Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 16 Dec 2022 10:24:42 +0000 Subject: [PATCH] test: Disable error on agent log in `scaletest/reconnectingpty` 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. --- scaletest/reconnectingpty/run_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scaletest/reconnectingpty/run_test.go b/scaletest/reconnectingpty/run_test.go index 30241a053dad9..643e37abe0005 100644 --- a/scaletest/reconnectingpty/run_test.go +++ b/scaletest/reconnectingpty/run_test.go @@ -281,7 +281,7 @@ func setupRunnerTest(t *testing.T) (client *codersdk.Client, agentID uuid.UUID) agentClient.SetSessionToken(authToken) agentCloser := agent.New(agent.Options{ Client: agentClient, - Logger: slogtest.Make(t, nil).Named("agent"), + Logger: slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Named("agent"), }) t.Cleanup(func() { _ = agentCloser.Close()