Skip to content

Commit 2c824e0

Browse files
committed
test(http2): verify GOAWAY error details
Assert the terminal GOAWAY error retains the peer last-stream identifier and renders its user-facing message. This pins the typed error contract used by response lifecycle failures.
1 parent 07b0ace commit 2c824e0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/http2_client_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,9 @@ end
19441944
@test String(_read_all_h2_body(response.body)) == "ok"
19451945
failure = only(failures)::TaskFailedException
19461946
@test failure.task.exception isa HT.H2GoAwayError
1947+
goaway_error = failure.task.exception::HT.H2GoAwayError
1948+
@test goaway_error.last_stream_id == UInt32(1)
1949+
@test sprint(showerror, goaway_error) == "HTTP/2 stream rejected by GOAWAY"
19471950
_wait_task_h2!(server_task)
19481951
finally
19491952
close(h2_conn)

0 commit comments

Comments
 (0)