Flakiness may be observed when running the unit tests.
The symptom of that looks like:
requests.exceptions.ConnectionError: ('Connection aborted.',
BadStatusLine('Hello world!HTTP/1.1 200 OK\r\n'))
We believe that, with the correct send and recv timing, the "Hello
world!" body from a HEAD request will be left unread in the reused
socket, resulting in an invalid read for the next request along.
testutils: fix test flake on HEAD request
Flakiness may be observed when running the unit tests. The symptom of that looks like: requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('Hello world!HTTP/1.1 200 OK\r\n'))
We believe that, with the correct send and recv timing, the "Hello world!" body from a HEAD request will be left unread in the reused socket, resulting in an invalid read for the next request along.
Co-authored-by: Olivier Gayot olivier.gayot@canonical.com