forked from quic-go/quic-go
implement basic FlowControlManager
This commit is contained in:
@@ -35,24 +35,24 @@ var _ = Describe("Flow controller", func() {
|
||||
})
|
||||
|
||||
It("reads the stream send and receive windows when acting as stream-level flow controller", func() {
|
||||
fc := NewFlowController(5, cpm).(*flowController)
|
||||
fc := NewFlowController(5, cpm)
|
||||
Expect(fc.streamID).To(Equal(protocol.StreamID(5)))
|
||||
Expect(fc.receiveFlowControlWindow).To(Equal(protocol.ByteCount(2000)))
|
||||
})
|
||||
|
||||
It("reads the stream send and receive windows when acting as stream-level flow controller", func() {
|
||||
fc := NewFlowController(0, cpm).(*flowController)
|
||||
fc := NewFlowController(0, cpm)
|
||||
Expect(fc.streamID).To(Equal(protocol.StreamID(0)))
|
||||
Expect(fc.receiveFlowControlWindow).To(Equal(protocol.ByteCount(4000)))
|
||||
})
|
||||
|
||||
It("does not set the stream flow control windows for sending", func() {
|
||||
fc := NewFlowController(5, cpm).(*flowController)
|
||||
fc := NewFlowController(5, cpm)
|
||||
Expect(fc.sendFlowControlWindow).To(BeZero())
|
||||
})
|
||||
|
||||
It("does not set the connection flow control windows for sending", func() {
|
||||
fc := NewFlowController(0, cpm).(*flowController)
|
||||
fc := NewFlowController(0, cpm)
|
||||
Expect(fc.sendFlowControlWindow).To(BeZero())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user