mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
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
This commit is contained in:
parent
cb14986b8d
commit
bae5d86600
@ -271,20 +271,6 @@ class TestHTTP(BaseTest):
|
|||||||
|
|
||||||
server.log.filter_level = orig_level
|
server.log.filter_level = orig_level
|
||||||
conn = server.connect()
|
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
|
# Test closing
|
||||||
server.loop.opts.timeout = 10 # ensure socket is not closed because of timeout
|
server.loop.opts.timeout = 10 # ensure socket is not closed because of timeout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user