Skip to content

Commit 7fc9d45

Browse files
committed
ci: debug failing test
1 parent 154b806 commit 7fc9d45

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

systemtest/apmservertest/server.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ func NewUnstartedServerTB(tb testing.TB, args ...string) *Server {
144144
tb.Logf("log file: %s", logfile.Name())
145145
}
146146

147+
if tb.Failed() {
148+
b, err := io.ReadAll(logfile)
149+
if err != nil {
150+
tb.Fatal(err)
151+
}
152+
153+
tb.Log(string(b))
154+
}
155+
147156
// Call the server's Close method in a background goroutine,
148157
// and wait for up to 10 seconds for it to complete.
149158
errc := make(chan error)

0 commit comments

Comments
 (0)