make the initial stream flow control window configurable

This commit is contained in:
Marten Seemann
2021-03-10 14:55:42 +08:00
parent 9dcb56b76f
commit d9434f523e
5 changed files with 23 additions and 10 deletions

View File

@@ -57,6 +57,8 @@ var _ = Describe("Config", func() {
f.Set(reflect.ValueOf(time.Hour))
case "TokenStore":
f.Set(reflect.ValueOf(NewLRUTokenStore(2, 3)))
case "InitialStreamFlowControlWindow":
f.Set(reflect.ValueOf(uint64(1234)))
case "MaxReceiveStreamFlowControlWindow":
f.Set(reflect.ValueOf(uint64(9)))
case "MaxReceiveConnectionFlowControlWindow":
@@ -142,6 +144,7 @@ var _ = Describe("Config", func() {
c := populateConfig(&Config{})
Expect(c.Versions).To(Equal(protocol.SupportedVersions))
Expect(c.HandshakeIdleTimeout).To(Equal(protocol.DefaultHandshakeIdleTimeout))
Expect(c.InitialStreamFlowControlWindow).To(BeEquivalentTo(protocol.DefaultInitialMaxStreamData))
Expect(c.MaxReceiveStreamFlowControlWindow).To(BeEquivalentTo(protocol.DefaultMaxReceiveStreamFlowControlWindow))
Expect(c.MaxReceiveConnectionFlowControlWindow).To(BeEquivalentTo(protocol.DefaultMaxReceiveConnectionFlowControlWindow))
Expect(c.MaxIncomingStreams).To(BeEquivalentTo(protocol.DefaultMaxIncomingStreams))