Closed choksi81 closed 6 years ago
Author: justinc For my Mac, I need to set the timeout to be > 30 seconds for this to work. It fixes the issue, but I really think we need a better solution.
I looked and it seems that calling shutdown may be able to prevent this. Is the answer as easy as calling this before close / garbage collection? http://docs.python.org/library/socket.html#socket.socket.close
Unfortunately, I'm starting to get off in the weeds with this and need to fix the problem I was originally working on. Someone else should feel free to take this ticket.
Author: vijay For my Mac , I modified the test case by making it to sleep for 6 seconds before performing receive operation on a closed socket and it fixed the issue.
We are already shutting down the socket prior to closing it.
I need to dig deep into this issue and this is only on Mac OS X .
It is typical for most of the networking unit tests to fail when run on a Mac. (Example failure output below.) This is due to !CleanupInProgressErrors. We should handle this in an intelligent way. I'm going to investigate adding a short sleep / retry to appropriate tests and if this does not work then maybe the tests should choose unique ports in some range.