mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
parent
459080a6dc
commit
c095261749
3 changed files with 23 additions and 1 deletions
|
@ -63,6 +63,16 @@ var _ = Describe("receivedPacketHandler", func() {
|
|||
Expect(handler.packetHistory).To(HaveKey(protocol.PacketNumber(3)))
|
||||
Expect(handler.packetHistory[3].TimeReceived).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
|
||||
})
|
||||
|
||||
It("doesn't store more than MaxTrackedReceivedPackets packets", func() {
|
||||
for i := uint32(0); i < protocol.MaxTrackedReceivedPackets; i++ {
|
||||
packetNumber := protocol.PacketNumber(1 + 2*i)
|
||||
err := handler.ReceivedPacket(packetNumber, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
err := handler.ReceivedPacket(protocol.PacketNumber(3*protocol.MaxTrackedReceivedPackets), true)
|
||||
Expect(err).To(MatchError(errTooManyOutstandingReceivedPackets))
|
||||
})
|
||||
})
|
||||
|
||||
Context("Entropy calculation", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue