refactor frame packing to logic to not access the streams map (#4596)

* avoid accessing the streams map when packing stream data

* avoid accessing the streams map when packing flow control frames

* remove streamGetter interface
This commit is contained in:
Marten Seemann
2024-07-28 12:32:54 -07:00
committed by GitHub
parent fc79a77ffe
commit 42f04d4e02
20 changed files with 224 additions and 390 deletions

View File

@@ -414,7 +414,10 @@ var _ = Describe("Receive Stream", func() {
It("handles concurrent reads", func() {
mockFC.EXPECT().UpdateHighestReceived(protocol.ByteCount(6), gomock.Any()).AnyTimes()
var bytesRead protocol.ByteCount
mockFC.EXPECT().AddBytesRead(gomock.Any()).Do(func(n protocol.ByteCount) { bytesRead += n }).AnyTimes()
mockFC.EXPECT().AddBytesRead(gomock.Any()).Do(func(n protocol.ByteCount) bool {
bytesRead += n
return false
}).AnyTimes()
var numCompleted int32
mockSender.EXPECT().onStreamCompleted(streamID).Do(func(protocol.StreamID) {