Skip to content

Commit

Permalink
fix flaky HTTP/3 request body test (#3447)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jun 9, 2022
1 parent 4c96cf7 commit 6fbc6d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion http3/client_test.go
Expand Up @@ -797,9 +797,11 @@ var _ = Describe("Client", func() {
<-done
return 0, errors.New("test done")
})
str.EXPECT().Close()
closed := make(chan struct{})
str.EXPECT().Close().Do(func() { close(closed) })
_, err := client.RoundTripOpt(req, RoundTripOpt{})
Expect(err).To(MatchError("test done"))
Eventually(closed).Should(BeClosed())
})

It("sets the Content-Length", func() {
Expand Down

0 comments on commit 6fbc6d9

Please sign in to comment.