introduce separate tracing calls for sent long and short header packets

This commit is contained in:
Marten Seemann
2022-08-30 15:59:55 +03:00
parent 9e5f92b561
commit 24be84cd00
14 changed files with 127 additions and 61 deletions

View File

@@ -420,8 +420,8 @@ var _ = Describe("Tracing", func() {
Expect(ev).To(HaveKeyWithValue("initial_max_stream_data_uni", float64(300)))
})
It("records a sent packet, without an ACK", func() {
tracer.SentPacket(
It("records a sent long header packet, without an ACK", func() {
tracer.SentLongHeaderPacket(
&logging.ExtendedHeader{
Header: logging.Header{
IsLongHeader: true,
@@ -460,11 +460,11 @@ var _ = Describe("Tracing", func() {
Expect(frames[1].(map[string]interface{})).To(HaveKeyWithValue("frame_type", "stream"))
})
It("records a sent packet, without an ACK", func() {
tracer.SentPacket(
&logging.ExtendedHeader{
Header: logging.Header{DestConnectionID: protocol.ParseConnectionID([]byte{1, 2, 3, 4})},
PacketNumber: 1337,
It("records a sent short header packet, without an ACK", func() {
tracer.SentShortHeaderPacket(
&logging.ShortHeader{
DestConnectionID: protocol.ParseConnectionID([]byte{1, 2, 3, 4}),
PacketNumber: 1337,
},
123,
&logging.AckFrame{AckRanges: []logging.AckRange{{Smallest: 1, Largest: 10}}},