forked from quic-go/quic-go
implement sender side behavior for RESET_STREAM_AT (#5242)
* improve existing send stream test * implement sender side behavior for RESET_STREAM_AT * refactor send stream cancelation and shutdown error handling * correctly deal with 0-RTT corner case
This commit is contained in:
@@ -17,9 +17,10 @@ import (
|
||||
type mockStream struct {
|
||||
id protocol.StreamID
|
||||
|
||||
closed bool
|
||||
closeErr error
|
||||
sendWindow protocol.ByteCount
|
||||
closed bool
|
||||
closeErr error
|
||||
sendWindow protocol.ByteCount
|
||||
supportsResetStreamAt bool
|
||||
}
|
||||
|
||||
func (s *mockStream) closeForShutdown(err error) {
|
||||
@@ -31,6 +32,10 @@ func (s *mockStream) updateSendWindow(limit protocol.ByteCount) {
|
||||
s.sendWindow = limit
|
||||
}
|
||||
|
||||
func (s *mockStream) enableResetStreamAt() {
|
||||
s.supportsResetStreamAt = true
|
||||
}
|
||||
|
||||
func TestStreamsMapIncomingGettingStreams(t *testing.T) {
|
||||
t.Run("client", func(t *testing.T) {
|
||||
testStreamsMapIncomingGettingStreams(t, protocol.PerspectiveClient, protocol.FirstIncomingUniStreamClient)
|
||||
|
||||
Reference in New Issue
Block a user