]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-70765: fix an HTTP/0.9 flaky test post GH-139514 (#139610)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 5 Oct 2025 16:51:16 +0000 (18:51 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Oct 2025 16:51:16 +0000 (16:51 +0000)
commit1fe89d324e6b96dc44a7bd593c428a90d1f39d55
tree5cf4dff32fa4d87ca2d2c82ac8aae8140c2b559d
parent6edb2ddb5f3695cf4938979d645f31d7fba43ec8
gh-70765: fix an HTTP/0.9 flaky test post GH-139514 (#139610)

Fix a flaky test introduced in 13dc2fde8cec1e8aad04c7635b3da4ff3e3dcb00.

After a single HTTP/0.9 request, both client and server are expected to
close the connection on their side. In particular, if a client sends two
requests with the same connection, only the first one should be handled.

In the tests, it might happen that checking for the second request to be
ignored did not take into account that the server may have already closed
the connection. This flaky behavior was first observed on macOS CI workers
but could not be reproduced locally on a Linux machine.
Lib/test/test_httpservers.py