mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
make the logging.Tracer and logging.ConnectionTracer a struct (#4082)
This commit is contained in:
parent
d8cc4cb3ef
commit
9b82196578
46 changed files with 1388 additions and 1158 deletions
|
@ -101,7 +101,8 @@ var _ = Describe("Connection", func() {
|
|||
mconn.EXPECT().RemoteAddr().Return(remoteAddr).AnyTimes()
|
||||
mconn.EXPECT().LocalAddr().Return(localAddr).AnyTimes()
|
||||
tokenGenerator := handshake.NewTokenGenerator([32]byte{0xa, 0xb, 0xc})
|
||||
tracer = mocklogging.NewMockConnectionTracer(mockCtrl)
|
||||
var tr *logging.ConnectionTracer
|
||||
tr, tracer = mocklogging.NewMockConnectionTracer(mockCtrl)
|
||||
tracer.EXPECT().NegotiatedVersion(gomock.Any(), gomock.Any(), gomock.Any()).MaxTimes(1)
|
||||
tracer.EXPECT().SentTransportParameters(gomock.Any())
|
||||
tracer.EXPECT().UpdatedKeyFromTLS(gomock.Any(), gomock.Any()).AnyTimes()
|
||||
|
@ -120,7 +121,7 @@ var _ = Describe("Connection", func() {
|
|||
&tls.Config{},
|
||||
tokenGenerator,
|
||||
false,
|
||||
tracer,
|
||||
tr,
|
||||
1234,
|
||||
utils.DefaultLogger,
|
||||
protocol.Version1,
|
||||
|
@ -2540,7 +2541,8 @@ var _ = Describe("Client Connection", func() {
|
|||
tlsConf = &tls.Config{}
|
||||
}
|
||||
connRunner = NewMockConnRunner(mockCtrl)
|
||||
tracer = mocklogging.NewMockConnectionTracer(mockCtrl)
|
||||
var tr *logging.ConnectionTracer
|
||||
tr, tracer = mocklogging.NewMockConnectionTracer(mockCtrl)
|
||||
tracer.EXPECT().NegotiatedVersion(gomock.Any(), gomock.Any(), gomock.Any()).MaxTimes(1)
|
||||
tracer.EXPECT().SentTransportParameters(gomock.Any())
|
||||
tracer.EXPECT().UpdatedKeyFromTLS(gomock.Any(), gomock.Any()).AnyTimes()
|
||||
|
@ -2556,7 +2558,7 @@ var _ = Describe("Client Connection", func() {
|
|||
42, // initial packet number
|
||||
false,
|
||||
false,
|
||||
tracer,
|
||||
tr,
|
||||
1234,
|
||||
utils.DefaultLogger,
|
||||
protocol.Version1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue