never increase the flow control limit for the crypto stream

This commit is contained in:
Marten Seemann 2018-09-18 21:40:42 -04:00
parent f78c0035b9
commit 8bd6168511
5 changed files with 9 additions and 28 deletions

View file

@ -15,16 +15,13 @@ var _ = Describe("Window Update Queue", func() {
streamGetter *MockStreamGetter
connFC *mocks.MockConnectionFlowController
queuedFrames []wire.Frame
cryptoStream *MockCryptoStream
)
BeforeEach(func() {
streamGetter = NewMockStreamGetter(mockCtrl)
cryptoStream = NewMockCryptoStream(mockCtrl)
connFC = mocks.NewMockConnectionFlowController(mockCtrl)
cryptoStream.EXPECT().StreamID().Return(protocol.StreamID(0)).AnyTimes()
queuedFrames = queuedFrames[:0]
q = newWindowUpdateQueue(streamGetter, cryptoStream, connFC, func(f wire.Frame) {
q = newWindowUpdateQueue(streamGetter, connFC, func(f wire.Frame) {
queuedFrames = append(queuedFrames, f)
})
})
@ -70,15 +67,6 @@ var _ = Describe("Window Update Queue", func() {
Expect(queuedFrames).To(BeEmpty())
})
It("adds MAX_STREAM_DATA frames for the crypto stream", func() {
cryptoStream.EXPECT().getWindowUpdate().Return(protocol.ByteCount(42))
q.AddStream(0)
q.QueueAll()
Expect(queuedFrames).To(Equal([]wire.Frame{
&wire.MaxStreamDataFrame{StreamID: 0, ByteOffset: 42},
}))
})
It("queues MAX_DATA frames", func() {
connFC.EXPECT().GetWindowUpdate().Return(protocol.ByteCount(0x1337))
q.AddConnection()