Message77988
Thanks for the report. I can reproduce this both on the py3k branch and the trunk. It looks as though there's a race condition
in the testShutDown/_testShutDown pair of methods in SocketConnectedTest. If you add the line
time.sleep(0.01)
to the middle of the _testShutDown method in test_socket.py (between the self.serv_conn.send() and the self.serv_conn.shutdown),
you'll probably find that this random occasional failure becomes a 99.9% reliable failure.
As far as I can tell, this is just a bug in test_socket itself, rather than a problem with the socket module. I also can't see
any reason why it should be Mac specific, but I don't have anything else handy to test on right now.
Suggested fix: don't let testShutDown exit until after _testShutdown has executed the shutdown method. Use a threading Event to
make this work. The attached patch (against the trunk) appears to fix the problem for me. Martina, if you're in a position to
test the patch, feedback would be welcome.
It would be good if someone could review this for sanity; I'm a complete novice when it comes to threading (and sockets, for that
matter). |
|
Date |
User |
Action |
Args |
2008-12-17 21:44:34 | mark.dickinson | set | recipients:
+ mark.dickinson, oefe |
2008-12-17 21:44:33 | mark.dickinson | set | messageid: <1229550273.99.0.143068922247.issue4397@psf.upfronthosting.co.za> |
2008-12-17 21:44:33 | mark.dickinson | link | issue4397 messages |
2008-12-17 21:44:31 | mark.dickinson | create | |
|