mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
accept the control stream and parse SETTINGS frame, for the H3 client
This commit is contained in:
parent
f92b0ec74a
commit
808671e2d4
3 changed files with 205 additions and 10 deletions
|
@ -101,6 +101,10 @@ var _ = Describe("RoundTripper", func() {
|
|||
session.EXPECT().OpenUniStream().AnyTimes().Return(nil, testErr)
|
||||
session.EXPECT().HandshakeComplete().Return(handshakeCtx)
|
||||
session.EXPECT().OpenStreamSync(context.Background()).Return(nil, testErr)
|
||||
session.EXPECT().AcceptUniStream(gomock.Any()).DoAndReturn(func(context.Context) (quic.ReceiveStream, error) {
|
||||
<-closed
|
||||
return nil, errors.New("test done")
|
||||
}).MaxTimes(1)
|
||||
session.EXPECT().CloseWithError(gomock.Any(), gomock.Any()).Do(func(quic.ErrorCode, string) { close(closed) })
|
||||
_, err = rt.RoundTrip(req)
|
||||
Expect(err).To(MatchError(testErr))
|
||||
|
@ -139,6 +143,10 @@ var _ = Describe("RoundTripper", func() {
|
|||
session.EXPECT().OpenUniStream().AnyTimes().Return(nil, testErr)
|
||||
session.EXPECT().HandshakeComplete().Return(handshakeCtx).Times(2)
|
||||
session.EXPECT().OpenStreamSync(context.Background()).Return(nil, testErr).Times(2)
|
||||
session.EXPECT().AcceptUniStream(gomock.Any()).DoAndReturn(func(context.Context) (quic.ReceiveStream, error) {
|
||||
<-closed
|
||||
return nil, errors.New("test done")
|
||||
}).MaxTimes(1)
|
||||
session.EXPECT().CloseWithError(gomock.Any(), gomock.Any()).Do(func(quic.ErrorCode, string) { close(closed) })
|
||||
req, err := http.NewRequest("GET", "https://quic.clemente.io/file1.html", nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue