This test case is now less sensitive to change of unrelated bits of the
client/server exchange.
Since this introduce some churn in the output, we do it independently for each
test cases.
| Alphare |
| hg-reviewers |
This test case is now less sensitive to change of unrelated bits of the
client/server exchange.
Since this introduce some churn in the output, we do it independently for each
test cases.
| 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 (7 lines) |
| readline(1 from ~) -> (1) G | readline(1 from ~) -> (1) G | ||||
| read limit reached; closing socket | read limit reached; closing socket | ||||
| $ rm -f error.log | $ rm -f error.log | ||||
| Same failure, but server reads full HTTP request line | Same failure, but server reads full HTTP request line | ||||
| ----------------------------------------------------- | ----------------------------------------------------- | ||||
| $ hg serve --config badserver.close-after-recv-bytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve \ | ||||
| > --config badserver.close-after-recv-patterns="GET /\?cmd=capabilities" \ | |||||
| > --config badserver.close-after-recv-bytes=7 \ | |||||
| > -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 | ||||
| abort: error: bad HTTP status line: * (glob) | abort: error: bad HTTP status line: * (glob) | ||||
| [100] | [100] | ||||
| $ killdaemons.py $DAEMON_PIDS | $ killdaemons.py $DAEMON_PIDS | ||||
| $ cat error.log | $ cat error.log | ||||
| readline(40 from ~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n | readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n | ||||
| readline(7 from *) -> (7) Accept- (glob) | readline(7 from *) -> (7) Accept- (glob) | ||||
| read limit reached; closing socket | read limit reached; closing socket | ||||
| $ rm -f error.log | $ rm -f error.log | ||||
| Failure on subsequent HTTP request on the same socket (cmd?batch) | Failure on subsequent HTTP request on the same socket (cmd?batch) | ||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ||||