summaryrefslogtreecommitdiff
path: root/tests/api_test.py
diff options
context:
space:
mode:
authorRyan Williams <rdw@lindenlab.com>2010-01-25 18:10:13 -0800
committerRyan Williams <rdw@lindenlab.com>2010-01-25 18:10:13 -0800
commitaf59d5cc4d8ea6ba260c512d3179a0dbaa8587ab (patch)
tree8471da69fa34a4e7e1a51dee04db6a01c03551d1 /tests/api_test.py
parentc856c95729082cb0f5f59ffa408c0ea4aca74c4c (diff)
downloadeventlet-af59d5cc4d8ea6ba260c512d3179a0dbaa8587ab.tar.gz
Moved a test.
Diffstat (limited to 'tests/api_test.py')
-rw-r--r--tests/api_test.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/api_test.py b/tests/api_test.py
index 343293d..c4652a8 100644
--- a/tests/api_test.py
+++ b/tests/api_test.py
@@ -154,42 +154,6 @@ class TestApi(TestCase):
def test_naming_missing_class(self):
self.assertRaises(
ImportError, api.named, 'this_name_should_hopefully_not_exist.Foo')
-
- def test_timeout_and_final_write(self):
- # This test verifies that a write on a socket that we've
- # stopped listening for doesn't result in an incorrect switch
- server = api.tcp_listener(('127.0.0.1', 0))
- bound_port = server.getsockname()[1]
-
- def sender(evt):
- s2, addr = server.accept()
- wrap_wfile = s2.makefile()
-
- api.sleep(0.02)
- wrap_wfile.write('hi')
- s2.close()
- evt.send('sent via event')
-
- from eventlet import coros
- evt = coros.Event()
- api.spawn(sender, evt)
- api.sleep(0) # lets the socket enter accept mode, which
- # is necessary for connect to succeed on windows
- try:
- # try and get some data off of this pipe
- # but bail before any is sent
- api.exc_after(0.01, api.TimeoutError)
- client = api.connect_tcp(('127.0.0.1', bound_port))
- wrap_rfile = client.makefile()
- _c = wrap_rfile.read(1)
- self.fail()
- except api.TimeoutError:
- pass
-
- result = evt.wait()
- self.assertEquals(result, 'sent via event')
- server.close()
- client.close()
def test_killing_dormant(self):
@@ -205,7 +169,6 @@ class TestApi(TestCase):
pass
# when switching to hub, hub makes itself the parent of this greenlet,
# thus after the function's done, the control will go to the parent
- # QQQ why the first sleep is not enough?
api.sleep(0)
state.append('finished')
g = api.spawn(test)