Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba483ef

Browse files
authored
chore: add logging for Run failures in workspacetraffic (#15425)
Run logs are currently dropped on the floor when workspacetraffic tests fail.e.g.https://github.com/coder/coder/runs/32640144785This prints the logs when we get a failure, like``` run_test.go:341: Error Trace:/Users/spike/repos/coder/scaletest/workspacetraffic/run_test.go:341 /Users/spike/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.8.darwin-arm64/src/runtime/asm_arm64.s:1222 Error: Received unexpected error: badness: github.com/coder/coder/v2/scaletest/workspacetraffic.(*Runner).Run /Users/spike/repos/coder/scaletest/workspacetraffic/run.go:174 Test: TestRun/App Messages: RUN LOGS: 2024-11-07 13:04:30.274 [debu] config agent_id=00000000-0000-0000-0000-000000000000 reconnecting_pty_id=95bb480f-cd26-4633-8332-328d44ffa997 height=25 width=80 tick_interval=1s bytes_per_tick=1024 2024-11-07 13:04:30.274 [debu] connect to workspace agent agent_id=00000000-0000-0000-0000-000000000000 2024-11-07 13:04:30.274 [info] sending traffic to workspace app agent_id=00000000-0000-0000-0000-000000000000 app=echo 2024-11-07 13:04:30.276 [debu] reading from agent agent_id=00000000-0000-0000-0000-000000000000 2024-11-07 13:04:30.276 [debu] writing to agent agent_id=00000000-0000-0000-0000-000000000000 2024-11-07 13:04:31.526 [debu] done reading from agent agent_id=00000000-0000-0000-0000-000000000000 2024-11-07 13:04:32.276 [debu] done writing to agent agent_id=00000000-0000-0000-0000-000000000000 END RUN LOGS```So, hopefully we can diagnose flakes.
1 parentcee6b1e commitba483ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎scaletest/workspacetraffic/run_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func TestRun(t *testing.T) {
116116
gofunc() {
117117
deferclose(runDone)
118118
err:=runner.Run(ctx,"",&logs)
119-
assert.NoError(t,err,"unexpected error calling Run()")
119+
assert.NoError(t,err,"RUN LOGS:\n%s\nEND RUN LOGS\n",logs.String())
120120
}()
121121

122122
gotMetrics:=make(chanstruct{})
@@ -236,7 +236,7 @@ func TestRun(t *testing.T) {
236236
gofunc() {
237237
deferclose(runDone)
238238
err:=runner.Run(ctx,"",&logs)
239-
assert.NoError(t,err,"unexpected error calling Run()")
239+
assert.NoError(t,err,"RUN LOGS:\n%s\nEND RUN LOGS\n",logs.String())
240240
}()
241241

242242
gotMetrics:=make(chanstruct{})
@@ -338,7 +338,7 @@ func TestRun(t *testing.T) {
338338
gofunc() {
339339
deferclose(runDone)
340340
err:=runner.Run(ctx,"",&logs)
341-
assert.NoError(t,err,"unexpected error calling Run()")
341+
assert.NoError(t,err,"RUN LOGS:\n%s\nEND RUN LOGS\n",logs.String())
342342
}()
343343

344344
gotMetrics:=make(chanstruct{})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp