fix bug in test__greenness.py
server used to go into non-yielding infinite loop if listening socket was closed, which made the whole thing to timeout
This commit is contained in:
@@ -38,9 +38,8 @@ def start_http_server():
|
|||||||
#print "Serving HTTP on", sa[0], "port", sa[1], "..."
|
#print "Serving HTTP on", sa[0], "port", sa[1], "..."
|
||||||
httpd.request_count = 0
|
httpd.request_count = 0
|
||||||
def serve():
|
def serve():
|
||||||
while 1:
|
httpd.handle_request()
|
||||||
httpd.handle_request()
|
httpd.request_count += 1
|
||||||
httpd.request_count += 1
|
|
||||||
return spawn(serve), httpd
|
return spawn(serve), httpd
|
||||||
|
|
||||||
class TestGreenness(unittest.TestCase):
|
class TestGreenness(unittest.TestCase):
|
||||||
|
Reference in New Issue
Block a user