summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_kqueue.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-01-24 16:22:21 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-01-24 16:22:21 (GMT)
commit3dfe55b6ff9e7a74bca94d5b95dbfafb9aa2a987 (patch)
tree68bb5fa385b3ab7c5ccf39d37a54ee84129b66da /Lib/test/test_kqueue.py
parentacbf461fe5d1f5f7516dd2cbbf3c1185ab3ec2b7 (diff)
downloadcpython-3dfe55b6ff9e7a74bca94d5b95dbfafb9aa2a987.zip
cpython-3dfe55b6ff9e7a74bca94d5b95dbfafb9aa2a987.tar.gz
cpython-3dfe55b6ff9e7a74bca94d5b95dbfafb9aa2a987.tar.bz2
Merged revisions 68897 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68897 | mark.dickinson | 2009-01-24 16:17:27 +0000 (Sat, 24 Jan 2009) | 2 lines Issue #5025: Fix occasional test_kqueue failure on OS X. ........
Diffstat (limited to 'Lib/test/test_kqueue.py')
-rw-r--r--Lib/test/test_kqueue.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_kqueue.py b/Lib/test/test_kqueue.py
index ef43633..93deb1e 100644
--- a/Lib/test/test_kqueue.py
+++ b/Lib/test/test_kqueue.py
@@ -120,12 +120,15 @@ class TestKQueue(unittest.TestCase):
client.send(b"Hello!")
server.send(b"world!!!")
- events = kq.control(None, 4, 1)
# We may need to call it several times
- for i in range(5):
+ for i in range(10):
+ events = kq.control(None, 4, 1)
if len(events) == 4:
break
- events = kq.control(None, 4, 1)
+ time.sleep(1.0)
+ else:
+ self.fail('timeout waiting for event notifications')
+
events = [(e.ident, e.filter, e.flags) for e in events]
events.sort()