tests/test-http-bad-server.t
changeset 32020 acc67cd7f508
parent 32002 bf855efe5664
child 32022 e5d7f99a3063
equal deleted inserted replaced
32019:bca8ad5c1256 32020:acc67cd7f508
    32 
    32 
    33   $ hg --config badserver.closebeforeaccept=true serve -p $HGPORT -d --pid-file=hg.pid
    33   $ hg --config badserver.closebeforeaccept=true serve -p $HGPORT -d --pid-file=hg.pid
    34   $ cat hg.pid > $DAEMON_PIDS
    34   $ cat hg.pid > $DAEMON_PIDS
    35 
    35 
    36   $ hg clone http://localhost:$HGPORT/ clone
    36   $ hg clone http://localhost:$HGPORT/ clone
    37   abort: error: Connection reset by peer
    37   abort: error: Connection reset by peer (no-windows !)
       
    38   abort: error: An existing connection was forcibly closed by the remote host (windows !)
    38   [255]
    39   [255]
    39 
    40 
    40 (The server exits on its own, but there is a race between that and starting a new server.
    41 (The server exits on its own, but there is a race between that and starting a new server.
    41 So ensure the process is dead.)
    42 So ensure the process is dead.)
    42 
    43 
    46 
    47 
    47   $ 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
    48   $ cat hg.pid > $DAEMON_PIDS
    49   $ cat hg.pid > $DAEMON_PIDS
    49 
    50 
    50   $ hg clone http://localhost:$HGPORT/ clone
    51   $ hg clone http://localhost:$HGPORT/ clone
    51   abort: error: Connection reset by peer
    52   abort: error: Connection reset by peer (no-windows !)
       
    53   abort: error: An existing connection was forcibly closed by the remote host (windows !)
    52   [255]
    54   [255]
    53 
    55 
    54   $ killdaemons.py $DAEMON_PIDS
    56   $ killdaemons.py $DAEMON_PIDS
    55 
    57 
    56 Failure to read all bytes in initial HTTP request should yield connection related error message
    58 Failure to read all bytes in initial HTTP request should yield connection related error message