convert ReceiveStream interface to a struct (#5173)

This commit is contained in:
Marten Seemann
2025-06-01 12:08:18 +08:00
committed by GitHub
parent 78e77bcfdb
commit 1169d97e81
19 changed files with 99 additions and 420 deletions

View File

@@ -133,7 +133,12 @@ func newConnPairWithDatagrams(t *testing.T) (client, server quic.EarlyConnection
return cl, conn
}
func expectStreamReadReset(t *testing.T, str quic.ReceiveStream, errCode quic.StreamErrorCode) {
type quicReceiveStream interface {
io.Reader
SetReadDeadline(time.Time) error
}
func expectStreamReadReset(t *testing.T, str quicReceiveStream, errCode quic.StreamErrorCode) {
t.Helper()
str.SetReadDeadline(time.Now().Add(time.Second))