summaryrefslogtreecommitdiff
path: root/tests/wsgi_test.py
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2013-08-09 14:25:10 +0400
committerSergey Shepelev <temotor@gmail.com>2013-08-09 14:25:10 +0400
commit7d4916f01462de09cb58853d9de2e85777c2ad5b (patch)
treed0635242d7337645fb168300507e6f989799bea0 /tests/wsgi_test.py
parentdcf0a11bc3059b892410cc8b8c7e752598f6f2e7 (diff)
downloadeventlet-7d4916f01462de09cb58853d9de2e85777c2ad5b.tar.gz
wsgi: configurable socket_timeout
Diffstat (limited to 'tests/wsgi_test.py')
-rw-r--r--tests/wsgi_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wsgi_test.py b/tests/wsgi_test.py
index 3bbbd2f..0e10de7 100644
--- a/tests/wsgi_test.py
+++ b/tests/wsgi_test.py
@@ -1201,6 +1201,17 @@ class TestHttpd(_TestBase):
self.assertTrue("BOOM" in runlog)
self.assertFalse("Traceback" in runlog)
+ def test_server_socket_timeout(self):
+ self.spawn_server(socket_timeout=0.1)
+ sock = eventlet.connect(('localhost', self.port))
+ sock.send('GET / HTTP/1.1\r\n')
+ eventlet.sleep(0.1)
+ try:
+ read_http(sock)
+ assert False, 'Expected ConnectionClosed exception'
+ except ConnectionClosed:
+ pass
+
def read_headers(sock):
fd = sock.makefile()