This specific test case is now using the new "close when a pattern is seen"
approach compared to the more fragile "that many bytes were sent" approach.
Since such change are still a bit noisy, we split each change in there own
changesets.
| Alphare |
| hg-reviewers |
This specific test case is now using the new "close when a pattern is seen"
approach compared to the more fragile "that many bytes were sent" approach.
Since such change are still a bit noisy, we split each change in there own
changesets.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | tests/test-http-bad-server.t (6 lines) |
| write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
| $ rm -f error.log | $ rm -f error.log | ||||
| Server stops before it sends transfer encoding | Server stops before it sends transfer encoding | ||||
| ---------------------------------------------- | ---------------------------------------------- | ||||
| $ hg serve --config badserver.close-after-send-bytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve \ | ||||
| > --config badserver.close-after-send-patterns="Transfer-Encoding: chunke" \ | |||||
| > -p $HGPORT -d --pid-file=hg.pid -E error.log | |||||
| $ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
| $ hg clone http://localhost:$HGPORT/ clone | $ hg clone http://localhost:$HGPORT/ clone | ||||
| requesting all changes | requesting all changes | ||||
| abort: stream ended unexpectedly (got 0 bytes, expected 1) | abort: stream ended unexpectedly (got 0 bytes, expected 1) | ||||
| [255] | [255] | ||||
| $ killdaemons.py $DAEMON_PIDS | $ killdaemons.py $DAEMON_PIDS | ||||
| #if py36 | #if py36 | ||||
| $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -6 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -6 | ||||
| sendall(162 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunke | sendall(162 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunke | ||||
| write limit reached; closing socket | write limit reached; closing socket | ||||
| $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
| Traceback (most recent call last): | Traceback (most recent call last): | ||||
| Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
| #else | #else | ||||
| $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -7 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -7 | ||||
| write(41 from 41) -> (25) Content-Type: application/mercurial-0.2\r\n | write(41) -> Content-Type: application/mercurial-0.2\r\n | ||||
| write(25 from 28) -> (0) Transfer-Encoding: chunke | write(25 from 28) -> (0) Transfer-Encoding: chunke | ||||
| write limit reached; closing socket | write limit reached; closing socket | ||||
| $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
| Traceback (most recent call last): | Traceback (most recent call last): | ||||
| Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
| write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
| #endif | #endif | ||||