Xavier de Gaye <xdeg...@gmail.com> added the comment: The test fails when use_poll is True. The difference between using poll() and poll2():
poll: All the read events are processed before the write events, so the close after the first recv by TestHandler will be followed by a send by TestClient within the same call to poll(). The test is deterministic. poll2: The order in which events are received is os dependent. So it is possible that the first recv by TestHandler is the last event in the 'r' list, so that after the close, a new call to poll2() is done and the first event in this new 'r' list, is not the expected write event for TestClient. What about forcing self.use_poll to False, before calling loop_waiting_for_flag() ? The drawback being that the test will be run twice with the same environment. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5661> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com