[Python-Dev] [Python-checkins] cpython (3.2): attempt to fix asyncore buildbot failure (original) (raw)

Jim Jewett jimjjewett at gmail.com
Fri Mar 23 19:03:20 CET 2012


What does this verify?

My assumption from the name (test_quick_connect) and the context (an asynchronous server) is that it is verifying the server can handle a certain level of load. Refusing the sockets should then be a failure, or at least a skipped test.

Would the below fail even if asyncore.loop were taken out of the threading.Thread target altogether?

On Fri, Mar 23, 2012 at 10:10 AM, giampaolo.rodola <python-checkins at python.org> wrote:

http://hg.python.org/cpython/rev/2db4e916245a changeset:   75901:2db4e916245a branch:      3.2 parent:      75897:b97964af7299 user:        Giampaolo Rodola' <g.rodola at gmail.com> date:        Fri Mar 23 15:07:07 2012 +0100 summary:  attempt to fix asyncore buildbot failure

files:  Lib/test/testasyncore.py |  10 +++++++---  1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Lib/test/testasyncore.py b/Lib/test/testasyncore.py --- a/Lib/test/testasyncore.py +++ b/Lib/test/testasyncore.py @@ -741,11 +741,15 @@ for x in range(20): s = socket.socket(socket.AFINET, socket.SOCKSTREAM) +            s.settimeout(.2) s.setsockopt(socket.SOLSOCKET, socket.SOLINGER,  struct.pack('ii', 1, 0)) -            s.connect(server.address) -            s.close() - +            try: +                s.connect(server.address) +            except socket.error: +                pass +            finally: +                s.close()  class TestAPIUseSelect(BaseTestAPI): usepoll = False -- Repository URL: http://hg.python.org/cpython


Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins



More information about the Python-Dev mailing list