mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
remove special case for testing when receiving packets in the session
This commit is contained in:
parent
bd6567afe1
commit
6c7fbc4a79
2 changed files with 5 additions and 9 deletions
|
@ -468,13 +468,13 @@ var _ = Describe("Session", func() {
|
|||
|
||||
It("informs the ReceivedPacketHandler", func() {
|
||||
unpacker.EXPECT().Unpack(gomock.Any(), gomock.Any(), gomock.Any()).Return(&unpackedPacket{}, nil)
|
||||
now := time.Now().Add(time.Hour)
|
||||
rph := mockackhandler.NewMockReceivedPacketHandler(mockCtrl)
|
||||
rph.EXPECT().ReceivedPacket(protocol.PacketNumber(5), now, false)
|
||||
rph.EXPECT().ReceivedPacket(protocol.PacketNumber(5), gomock.Any(), false).Do(func(_ protocol.PacketNumber, t time.Time, _ bool) {
|
||||
Expect(t).To(BeTemporally("~", time.Now(), scaleDuration(25*time.Millisecond)))
|
||||
})
|
||||
sess.receivedPacketHandler = rph
|
||||
hdr.PacketNumber = 5
|
||||
err := sess.handlePacketImpl(&receivedPacket{header: hdr, rcvTime: now})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(sess.handlePacketImpl(&receivedPacket{header: hdr})).To(Succeed())
|
||||
})
|
||||
|
||||
It("doesn't inform the ReceivedPacketHandler about Retry packets", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue