send shorter StreamIDs

fixes #74
This commit is contained in:
Marten Seemann 2016-05-11 00:42:34 +07:00
parent e345270e84
commit 9a99df48a6
6 changed files with 157 additions and 21 deletions

View file

@ -420,12 +420,12 @@ var _ = Describe("Session", func() {
})
It("should call OnSent", func() {
session.QueueStreamFrame(&frames.StreamFrame{})
session.QueueStreamFrame(&frames.StreamFrame{StreamID: 5})
session.sendPacket()
Expect(cong.nCalls).To(Equal(2)) // OnPacketSent + GetCongestionWindow
Expect(cong.argsOnPacketSent[1]).To(Equal(protocol.ByteCount(30)))
Expect(cong.argsOnPacketSent[1]).To(Equal(protocol.ByteCount(27)))
Expect(cong.argsOnPacketSent[2]).To(Equal(protocol.PacketNumber(1)))
Expect(cong.argsOnPacketSent[3]).To(Equal(protocol.ByteCount(30)))
Expect(cong.argsOnPacketSent[3]).To(Equal(protocol.ByteCount(27)))
Expect(cong.argsOnPacketSent[4]).To(BeTrue())
})