Skip to content

Commit 5eccd0c

Browse files
committed
test(server): avoid windows post reuse flake
Request Connection: close in the buffered-body server test so it proves handler body buffering without depending on keep-alive reuse timing on Windows prerelease runners.
1 parent fbe6009 commit 5eccd0c

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/http_server_http1_tests.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,12 +796,22 @@ end
796796
address = HT.server_addr(server)
797797
client = HT.Client(transport = HT.Transport(max_idle_per_host = 1, max_idle_total = 1), cookiejar = nothing)
798798
try
799-
resp1 = HT.post("http://$(address)/echo"; body = "echo", client = client)
799+
resp1 = HT.post(
800+
"http://$(address)/echo";
801+
headers = ["Connection" => "close"],
802+
body = "echo",
803+
client = client,
804+
)
800805
@test resp1.status == 200
801806
@test String(resp1.body) == "echo"
802807
@test take!(seen_buffered)
803808

804-
resp2 = HT.post("http://$(address)/again"; body = "again", client = client)
809+
resp2 = HT.post(
810+
"http://$(address)/again";
811+
headers = ["Connection" => "close"],
812+
body = "again",
813+
client = client,
814+
)
805815
@test resp2.status == 200
806816
@test String(resp2.body) == "again"
807817
@test take!(seen_buffered)

0 commit comments

Comments
 (0)