use the new error types to log the reason why a connection is closed

This commit is contained in:
Marten Seemann
2021-05-03 14:00:41 +07:00
parent 5f2cf0422e
commit 1613809ba2
16 changed files with 87 additions and 307 deletions

View File

@@ -2,6 +2,7 @@ package logging
import (
"context"
"errors"
"net"
"time"
@@ -111,10 +112,10 @@ var _ = Describe("Tracing", func() {
})
It("traces the ClosedConnection event", func() {
reason := NewTimeoutCloseReason(TimeoutReasonIdle)
tr1.EXPECT().ClosedConnection(reason)
tr2.EXPECT().ClosedConnection(reason)
tracer.ClosedConnection(reason)
e := errors.New("test err")
tr1.EXPECT().ClosedConnection(e)
tr2.EXPECT().ClosedConnection(e)
tracer.ClosedConnection(e)
})
It("traces the SentTransportParameters event", func() {