test: log the CLI's stderr line by line when the db forward read fails
TestDBForwardLongRequestThroughTheEdge failed twice on CI (#1032), each time about a second into the CLI read, but the CLI's own error was lost: it was inside Fatalf's message, and the CI summary keeps only lines with the test file prefix. Seven local runs, three on a contended core, all pass, so the next CI failure has to say why. Each stderr line is now its own t.Logf, like the connection traces above it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+6
−1
dbforward_e2e_test.go+6 −1
CI passed — run details
diff --git a/dbforward_e2e_test.go b/dbforward_e2e_test.go| index cf52eca3a..7b54af62a 100644 |
| --- a/dbforward_e2e_test.go |
| +++ b/dbforward_e2e_test.go |
| @@ -608,7 +608,12 @@ func checkProgressAtTheCLI(t *testing.T, e *dbfE2E, tap *dbfTap, atLeast time.Du |
| t.Logf("console conn: %s", line) |
| } |
| } |
| - t.Fatalf("%q %v\n%s", out.String(), err, strings.Join(stderr, "\n")) |
| + // The CLI's own sentence says why it stopped; log it the same way, or |
| + // the CI summary keeps only Fatalf's first line and loses it (#1032). |
| + for _, line := range stderr { |
| + t.Logf("cli stderr: %s", line) |
| + } |
| + t.Fatalf("the CLI read stopped after %s: stdout %q, %v", end.Sub(start), out.String(), err) |
| } |
| if reading.IsZero() || reading.Sub(start) > time.Second { |
| t.Fatalf("DBF-11 after %s: %q", reading.Sub(start), stderr) |