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

Skip to content

test: Disable error on agent log in scaletest/reconnectingpty #5445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
mafredri committed Dec 16, 2022
commit dbda26f16500cd15dc781f9f929d9b2b89e85c1b
2 changes: 1 addition & 1 deletion scaletest/reconnectingpty/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down