Skip to content

Commit

Permalink
fix linux test
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 18, 2022
1 parent 8cd6da1 commit 619ee07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,8 @@ end
@testset "Retry with request/response body streams" begin
shouldfail = Ref(true)
server = HTTP.listen!(8080) do http
if VERSION < v"1.7"
yield()
end
@assert !eof(http)
msg = String(readavailable(http))
msg = String(read(http))
if shouldfail[]
shouldfail[] = false
error("500 unexpected error")
Expand All @@ -547,6 +544,7 @@ end
# when retrying, we can still get access to the most recent failed response body in the response's request context
shouldfail[] = true
seekstart(req_body)
println("making 3rd request")
resp = HTTP.get("http://localhost:8080/retry"; body=req_body, response_stream=res_body)
@test resp.status == 200
@test String(take!(res_body)) == "hey there sailor"
Expand Down

0 comments on commit 619ee07

Please sign in to comment.