tests/test-http-bad-server.t
branchstable
changeset 32064 f82cdd5ee57e
parent 32024 ad41739c6b2b
child 32067 52cca17ac523
equal deleted inserted replaced
32063:befefdd34cf8 32064:f82cdd5ee57e
    46 Failure immediately after accept() should yield connection related error message
    46 Failure immediately after accept() should yield connection related error message
    47 
    47 
    48   $ hg --config badserver.closeafteraccept=true serve -p $HGPORT -d --pid-file=hg.pid
    48   $ hg --config badserver.closeafteraccept=true serve -p $HGPORT -d --pid-file=hg.pid
    49   $ cat hg.pid > $DAEMON_PIDS
    49   $ cat hg.pid > $DAEMON_PIDS
    50 
    50 
    51   $ hg clone http://localhost:$HGPORT/ clone
    51 TODO: this usually outputs good results, but sometimes emits abort:
    52   abort: error: Connection reset by peer (no-windows !)
    52 error: '' on FreeBSD and OS X.
    53   abort: error: An existing connection was forcibly closed by the remote host (windows !)
    53 What we ideally want are:
       
    54 
       
    55 abort: error: Connection reset by peer (no-windows !)
       
    56 abort: error: An existing connection was forcibly closed by the remote host (windows !)
       
    57 
       
    58 The flakiness in this output was observable easily with
       
    59 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
       
    60   $ hg clone http://localhost:$HGPORT/ clone
       
    61   abort: error: * (glob)
    54   [255]
    62   [255]
    55 
    63 
    56   $ killdaemons.py $DAEMON_PIDS
    64   $ killdaemons.py $DAEMON_PIDS
    57 
    65 
    58 Failure to read all bytes in initial HTTP request should yield connection related error message
    66 Failure to read all bytes in initial HTTP request should yield connection related error message