mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
introduce separate tracing calls for sent long and short header packets
This commit is contained in:
parent
9e5f92b561
commit
24be84cd00
14 changed files with 127 additions and 61 deletions
|
@ -157,13 +157,22 @@ var _ = Describe("Tracing", func() {
|
|||
tracer.RestoredTransportParameters(tp)
|
||||
})
|
||||
|
||||
It("traces the SentPacket event", func() {
|
||||
It("traces the SentLongHeaderPacket event", func() {
|
||||
hdr := &ExtendedHeader{Header: Header{DestConnectionID: protocol.ParseConnectionID([]byte{1, 2, 3})}}
|
||||
ack := &AckFrame{AckRanges: []AckRange{{Smallest: 1, Largest: 10}}}
|
||||
ping := &PingFrame{}
|
||||
tr1.EXPECT().SentPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tr2.EXPECT().SentPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tracer.SentPacket(hdr, 1337, ack, []Frame{ping})
|
||||
tr1.EXPECT().SentLongHeaderPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tr2.EXPECT().SentLongHeaderPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tracer.SentLongHeaderPacket(hdr, 1337, ack, []Frame{ping})
|
||||
})
|
||||
|
||||
It("traces the SentShortHeaderPacket event", func() {
|
||||
hdr := &ShortHeader{DestConnectionID: protocol.ParseConnectionID([]byte{1, 2, 3})}
|
||||
ack := &AckFrame{AckRanges: []AckRange{{Smallest: 1, Largest: 10}}}
|
||||
ping := &PingFrame{}
|
||||
tr1.EXPECT().SentShortHeaderPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tr2.EXPECT().SentShortHeaderPacket(hdr, ByteCount(1337), ack, []Frame{ping})
|
||||
tracer.SentShortHeaderPacket(hdr, 1337, ack, []Frame{ping})
|
||||
})
|
||||
|
||||
It("traces the ReceivedVersionNegotiationPacket event", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue