Merge pull request #1028 from lucas-clemente/fix-986

add the offset to the BLOCKED and STREAM_BLOCKED frames
This commit is contained in:
Marten Seemann 2017-12-14 19:21:05 +07:00 committed by GitHub
commit 448928fc63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 116 additions and 53 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() {