+ assert False, 'Expected ConnectionClosed exception'
+ except tests.wsgi_test.ConnectionClosed:
+ pass
+
+ fd1.close()
+ sock1.close()
+ finally:
+ # reset streams, then output trapped tracebacks
+ sock_wrap.unwrap()
+ # check output asserts in tests.wsgi_test.TestHttpd
+ # test_143_server_connection_timeout_exception
+
+ return output_buffer[:]
+
+
+def main():
+ output_normal = step(debug=False)
+ output_debug = step(debug=True)
+
+ assert "timed out" in output_debug[-1], repr(output_debug)
+ # if the BOOM check fails, it's because our timeout didn't happen
+ # (if eventlet stops using file.readline() to read HTTP headers,
+ # for instance)
+ assert TAG_BOOM == output_debug[-2], repr(output_debug)
+ assert TAG_BOOM == output_normal[-1], repr(output_normal)
+ assert "Traceback" not in output_debug, repr(output_debug)
+ assert "Traceback" not in output_normal, repr(output_normal)
+ print("pass")