Fixed test_trampoline_timeout.
This commit is contained in:
@@ -136,8 +136,8 @@ def trampoline(fd, read=None, write=None, timeout=None):
|
|||||||
def _do_close(fn):
|
def _do_close(fn):
|
||||||
hub.remove_descriptor(fn)
|
hub.remove_descriptor(fn)
|
||||||
greenlib.switch(self, exc=socket.error(32, 'Broken pipe'))
|
greenlib.switch(self, exc=socket.error(32, 'Broken pipe'))
|
||||||
def _do_timeout(fn):
|
def _do_timeout():
|
||||||
hub.remove_descriptor(fn)
|
hub.remove_descriptor(fileno)
|
||||||
greenlib.switch(self, exc=TimeoutError())
|
greenlib.switch(self, exc=TimeoutError())
|
||||||
def cb(_fileno):
|
def cb(_fileno):
|
||||||
if t is not None:
|
if t is not None:
|
||||||
|
@@ -93,10 +93,7 @@ class TestApi(tests.TestCase):
|
|||||||
|
|
||||||
check_hub()
|
check_hub()
|
||||||
|
|
||||||
def dont_test_trampoline_timeout(self):
|
def test_trampoline_timeout(self):
|
||||||
"""This test is broken. Please change it's name to test_trampoline_timeout,
|
|
||||||
and fix the bug (or fix the test)
|
|
||||||
"""
|
|
||||||
server = api.tcp_listener(('0.0.0.0', 0))
|
server = api.tcp_listener(('0.0.0.0', 0))
|
||||||
bound_port = server.getsockname()[1]
|
bound_port = server.getsockname()[1]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user