Commit ef681973 authored by Denis Bilenko's avatar Denis Bilenko

test__socket: remove deprecated test_server

parent 70675e7c
...@@ -98,26 +98,6 @@ class TestTCP(greentest.TestCase): ...@@ -98,26 +98,6 @@ class TestTCP(greentest.TestCase):
fd.close() fd.close()
acceptor.get() acceptor.get()
# this test was copied from api_test.py
# using kill() like that is not good, so tcp_server should return an object
# that provides kill() method or removed altogether
def DEPRECATED_test_server(self):
connected = []
current = gevent.getcurrent()
def accept_twice((conn, addr)):
connected.append(True)
conn.close()
if len(connected) == 2:
#gevent.kill(current, socket.error(32, 'broken pipe'))
gevent.core.active_event(current.throw, socket.error(32, 'broken pipe'))
g1 = gevent.spawn_link_exception(self.create_connection)
g2 = gevent.spawn_link_exception(self.create_connection)
socket.tcp_server(self.listener, accept_twice)
assert len(connected) == 2
gevent.joinall([g1, g2])
if hasattr(socket, 'ssl'): if hasattr(socket, 'ssl'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment