-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_keepalive_conn_management failure on Solaris. #561
Comments
I did more digging and managed to extract this issue into a much smaller example: # server.py
from cheroot import wsgi
def my_app(environ, start_response):
print(".")
status = '200 OK'
response_headers = [('Content-type','text/plain'), ('Content-length','12')]
start_response(status, response_headers)
return [b'Hello world!']
addr = ('0.0.0.0', 8088)
server = wsgi.Server(addr, my_app)
server.start() # client.py
import http.client
def get_connection():
http.client.HTTPConnection._http_vsn_str = 'HTTP/1.0'
http_connection = http.client.HTTPConnection("localhost:8088")
http_connection.auto_open = False
http_connection.connect()
return http_connection
def request(conn, keepalive=True):
conn.request("GET", "/page3", headers={'Connection': 'Keep-Alive'})
r1 = conn.getresponse()
assert r1.status == 200
assert r1.reason == 'OK'
print(r1.read())
print("-------")
conn1 = get_connection()
request(conn1)
request(conn1)
conn2 = get_connection()
request(conn2)
request(conn1) Running this results in |
I found an interesting thing - when I add a short delay ( Similarly, when I add a delay into the |
So, the mystery is solved, and Cheroot is innocent. I've got all the way to I am yet to find what exactly is wrong with the |
β I'm submitting a ...
π Describe the bug. What is the current behavior?
cheroot/test/test_conn.py::test_keepalive_conn_management
test fails on Oracle Solaris 11.4 when executed.π‘ To Reproduce
Clone this repo and run:
/usr/bin/python3.7 -m pytest cheroot/test/test_conn.py
in the root directory. The same thing happens when running tox and in multiple Python versions (I tested 3.7 and 3.9).
π‘ Expected behavior
The test suite is clean.
π Details
From what I can tell, the
c1
connection breaks right afterc2 = connection()
is called - specifically after thehttp_connection.connect()
call.π Environment
π Additional context
While not directly related, Cherrypy test suite is clean (tested with 18.8.0).
Our previous/current cheroot version (with clean test suite) is 6.3.2 and hence before #199.
I am happy to dig deeper into this but at this point I am not sure what might be the issue or where to look or what to try
The text was updated successfully, but these errors were encountered: