comparison tests/test-http-bad-server.t @ 35232:a037b6647d8c

tests: add a substitution for ECONNRESET/WSAECONNRESET messages
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 02 Dec 2017 20:10:58 -0500
parents 62e10bf001a9
children ad5f2b923b0d
comparison
equal deleted inserted replaced
35231:b33d4cf38666 35232:a037b6647d8c
34 34
35 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid 35 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid
36 $ cat hg.pid > $DAEMON_PIDS 36 $ cat hg.pid > $DAEMON_PIDS
37 37
38 $ hg clone http://localhost:$HGPORT/ clone 38 $ hg clone http://localhost:$HGPORT/ clone
39 abort: error: Connection reset by peer (no-windows !) 39 abort: error: $ECONNRESET$
40 abort: error: An existing connection was forcibly closed by the remote host (windows !)
41 [255] 40 [255]
42 41
43 (The server exits on its own, but there is a race between that and starting a new server. 42 (The server exits on its own, but there is a race between that and starting a new server.
44 So ensure the process is dead.) 43 So ensure the process is dead.)
45 44
52 51
53 TODO: this usually outputs good results, but sometimes emits abort: 52 TODO: this usually outputs good results, but sometimes emits abort:
54 error: '' on FreeBSD and OS X. 53 error: '' on FreeBSD and OS X.
55 What we ideally want are: 54 What we ideally want are:
56 55
57 abort: error: Connection reset by peer (no-windows !) 56 abort: error: $ECONNRESET$
58 abort: error: An existing connection was forcibly closed by the remote host (windows !)
59 57
60 The flakiness in this output was observable easily with 58 The flakiness in this output was observable easily with
61 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2. 59 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
62 $ hg clone http://localhost:$HGPORT/ clone 60 $ hg clone http://localhost:$HGPORT/ clone
63 abort: error: * (glob) 61 abort: error: * (glob)