mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #5025: Fix occasional test_kqueue failure on OS X.
This commit is contained in:
parent
f081e1c9d9
commit
c187d11af3
1 changed files with 6 additions and 3 deletions
|
@ -120,12 +120,15 @@ class TestKQueue(unittest.TestCase):
|
|||
client.send("Hello!")
|
||||
server.send("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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue