set the offset in BLOCKED and STREAM_BLOCKED frames

This commit is contained in:
Marten Seemann 2017-12-14 15:19:55 +07:00
parent 69998c19cb
commit 00edfb7461
12 changed files with 51 additions and 33 deletions

View file

@ -1146,10 +1146,13 @@ var _ = Describe("Stream", func() {
Context("flow control", func() {
It("says when it's flow control blocked", func() {
mockFC.EXPECT().IsBlocked().Return(false)
Expect(str.IsFlowControlBlocked()).To(BeFalse())
mockFC.EXPECT().IsBlocked().Return(true)
Expect(str.IsFlowControlBlocked()).To(BeTrue())
mockFC.EXPECT().IsBlocked().Return(false, protocol.ByteCount(0))
blocked, _ := str.IsFlowControlBlocked()
Expect(blocked).To(BeFalse())
mockFC.EXPECT().IsBlocked().Return(true, protocol.ByteCount(0x1337))
blocked, offset := str.IsFlowControlBlocked()
Expect(blocked).To(BeTrue())
Expect(offset).To(Equal(protocol.ByteCount(0x1337)))
})
It("updates the flow control window", func() {