mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
ackhandler: rename variables to follow RFC 9002 terminology (#4062)
This commit is contained in:
parent
6cde43785f
commit
96b1943cf5
4 changed files with 35 additions and 35 deletions
|
@ -25,26 +25,26 @@ var _ = Describe("Received Packet Tracker", func() {
|
|||
Context("accepting packets", func() {
|
||||
It("saves the time when each packet arrived", func() {
|
||||
Expect(tracker.ReceivedPacket(protocol.PacketNumber(3), protocol.ECNNon, time.Now(), true)).To(Succeed())
|
||||
Expect(tracker.largestObservedReceivedTime).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
|
||||
Expect(tracker.largestObservedRcvdTime).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
|
||||
})
|
||||
|
||||
It("updates the largestObserved and the largestObservedReceivedTime", func() {
|
||||
It("updates the largestObserved and the largestObservedRcvdTime", func() {
|
||||
now := time.Now()
|
||||
tracker.largestObserved = 3
|
||||
tracker.largestObservedReceivedTime = now.Add(-1 * time.Second)
|
||||
tracker.largestObservedRcvdTime = now.Add(-1 * time.Second)
|
||||
Expect(tracker.ReceivedPacket(5, protocol.ECNNon, now, true)).To(Succeed())
|
||||
Expect(tracker.largestObserved).To(Equal(protocol.PacketNumber(5)))
|
||||
Expect(tracker.largestObservedReceivedTime).To(Equal(now))
|
||||
Expect(tracker.largestObservedRcvdTime).To(Equal(now))
|
||||
})
|
||||
|
||||
It("doesn't update the largestObserved and the largestObservedReceivedTime for a belated packet", func() {
|
||||
It("doesn't update the largestObserved and the largestObservedRcvdTime for a belated packet", func() {
|
||||
now := time.Now()
|
||||
timestamp := now.Add(-1 * time.Second)
|
||||
tracker.largestObserved = 5
|
||||
tracker.largestObservedReceivedTime = timestamp
|
||||
tracker.largestObservedRcvdTime = timestamp
|
||||
Expect(tracker.ReceivedPacket(4, protocol.ECNNon, now, true)).To(Succeed())
|
||||
Expect(tracker.largestObserved).To(Equal(protocol.PacketNumber(5)))
|
||||
Expect(tracker.largestObservedReceivedTime).To(Equal(timestamp))
|
||||
Expect(tracker.largestObservedRcvdTime).To(Equal(timestamp))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue