mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
pass a string, not an error, to Session.CloseWithError
This commit is contained in:
parent
6cdc228ef6
commit
0a86224858
7 changed files with 12 additions and 11 deletions
|
@ -93,7 +93,7 @@ var _ = Describe("RoundTripper", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
session.EXPECT().OpenUniStreamSync().AnyTimes().Return(nil, testErr)
|
||||
session.EXPECT().OpenStreamSync().Return(nil, testErr)
|
||||
session.EXPECT().CloseWithError(gomock.Any(), gomock.Any()).Do(func(quic.ErrorCode, error) { close(closed) })
|
||||
session.EXPECT().CloseWithError(gomock.Any(), gomock.Any()).Do(func(quic.ErrorCode, string) { close(closed) })
|
||||
_, err = rt.RoundTrip(req)
|
||||
Expect(err).To(MatchError(testErr))
|
||||
Expect(rt.clients).To(HaveLen(1))
|
||||
|
@ -130,7 +130,7 @@ var _ = Describe("RoundTripper", func() {
|
|||
testErr := errors.New("test err")
|
||||
session.EXPECT().OpenUniStreamSync().AnyTimes().Return(nil, testErr)
|
||||
session.EXPECT().OpenStreamSync().Return(nil, testErr).Times(2)
|
||||
session.EXPECT().CloseWithError(gomock.Any(), gomock.Any()).Do(func(quic.ErrorCode, error) { close(closed) })
|
||||
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())
|
||||
_, err = rt.RoundTrip(req)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue