From bae5d86600b4df095c9cf1871c4bd22d0fc6ece5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 15 Jul 2019 09:05:39 +0530 Subject: [PATCH] Remove the pipelining test HTTP 1.1 pipelining is not used by any major HTTP clients and the internal state hackery required to make the HTTPCOnnection class do it was fragile on python 3, making the test flakey --- src/calibre/srv/tests/http.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/calibre/srv/tests/http.py b/src/calibre/srv/tests/http.py index 1f3bd2b7cc..d6970721ed 100644 --- a/src/calibre/srv/tests/http.py +++ b/src/calibre/srv/tests/http.py @@ -271,20 +271,6 @@ class TestHTTP(BaseTest): server.log.filter_level = orig_level conn = server.connect() - # Test pipelining - responses = [] - for i in range(10): - conn._HTTPConnection__state = http_client._CS_IDLE - conn.request('GET', '/%d'%i) - if ispy3: - responses.append(conn.response_class(conn.sock, method=conn._method)) - else: - responses.append(conn.response_class(conn.sock, strict=conn.strict, method=conn._method)) - for i in range(10): - r = responses[i] - r.begin() - self.ae(r.read(), ('%d' % i).encode('ascii')) - conn._HTTPConnection__state = http_client._CS_IDLE # Test closing server.loop.opts.timeout = 10 # ensure socket is not closed because of timeout