add a function to trace acknowledged packets

This commit is contained in:
Marten Seemann 2021-04-02 11:24:54 +07:00
parent e098ccd2b3
commit 875692ea10
9 changed files with 44 additions and 0 deletions

View file

@ -190,6 +190,12 @@ var _ = Describe("Tracing", func() {
tracer.UpdatedMetrics(rttStats, 1337, 42, 13)
})
It("traces the AcknowledgedPacket event", func() {
tr1.EXPECT().AcknowledgedPacket(EncryptionHandshake, PacketNumber(42))
tr2.EXPECT().AcknowledgedPacket(EncryptionHandshake, PacketNumber(42))
tracer.AcknowledgedPacket(EncryptionHandshake, 42)
})
It("traces the LostPacket event", func() {
tr1.EXPECT().LostPacket(EncryptionHandshake, PacketNumber(42), PacketLossReorderingThreshold)
tr2.EXPECT().LostPacket(EncryptionHandshake, PacketNumber(42), PacketLossReorderingThreshold)