New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_kqueue failure on OS X #49275
Comments
I just got a one-off, non-reproducible test_kqueue failure, during a 'make test_kqueue
test test_kqueue failed -- Traceback (most recent call last):
File "/Users/dickinsm/python_source/trunk/Lib/test/test_kqueue.py", line
136, in test_queue_event
(server.fileno(), select.KQ_FILTER_READ, flags)])
AssertionError: [(5L, -2, 5L), (6L, -2, 5L), (6L, -1, 5L)] != [(5, -2, 5),
(5, -1, 5), (6, -2, 5), (6, -1, 5)] Looking at the test_queue.py file just before line 136, I see: events = kq.control(None, 4, 1)
# We may need to call it several times
for i in range(5):
if len(events) == 4:
break
events = kq.control(None, 4, 1) Would adding a time.sleep(1.0) to the for loop make this test more robust? My first impression was that the '1' in 'kq.control(None, 4, 1)' already Out of curiosity, *why* is there a need to call this several times? I |
Since there are events in the result, the call succeeds immediately.
It's out of the control of the test what the kernel does to deliver the |
Here's a patch:
|
I just saw this same test_kqueue failure pop up on the OS X 3.x buildbot, Unless there are any objections, I'll go ahead and check this in: I think |
Fixed in the trunk in r68897. Will merge to 2.6, 3.0 and 3.1. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: