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.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-http-bad-server.t (16 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
d92d1bfa5e2e | 8a44c8940ebf | Pierre-Yves David | Jan 21 2022, 1:19 PM |
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) | ||||
----------------------------------------------------------------- | ----------------------------------------------------------------- | ||||
$ hg serve \ | $ hg serve \ | ||||
> --config badserver.close-after-recv-patterns="GET /\?cmd=batch," \ | > --config badserver.close-after-recv-patterns="GET /\?cmd=batch,GET /\?cmd=batch" \ | ||||
> --config badserver.close-after-recv-bytes=15,223 \ | > --config badserver.close-after-recv-bytes=15,197 \ | ||||
> -p $HGPORT -d --pid-file=hg.pid -E error.log | > -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 | ||||
write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) | write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) | ||||
write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) | write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) | ||||
write(21) -> Content-Length: 431\r\n (no-py3 !) | write(21) -> Content-Length: 431\r\n (no-py3 !) | ||||
write(2) -> \r\n (no-py3 !) | write(2) -> \r\n (no-py3 !) | ||||
write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) | write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) | ||||
readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) | readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) | ||||
readline(*) -> (1?) Accept-Encoding* (glob) | readline(*) -> (1?) Accept-Encoding* (glob) | ||||
read limit reached; closing socket | read limit reached; closing socket | ||||
readline(223 from ~) -> (26) GET /?cmd=batch HTTP/1.1\r\n | readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n | ||||
readline(197 from *) -> (27) Accept-Encoding: identity\r\n (glob) | readline(*) -> (27) Accept-Encoding: identity\r\n (glob) | ||||
readline(170 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) | readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) | ||||
readline(141 from *) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob) | readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob) | ||||
readline(100 from *) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob) | readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob) | ||||
readline(39 from *) -> (35) accept: application/mercurial-0.1\r\n (glob) | readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob) | ||||
readline(4 from *) -> (4) host (glob) | readline(4 from *) -> (4) host (glob) | ||||
read limit reached; closing socket | read limit reached; closing socket | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Failure to read getbundle HTTP request | Failure to read getbundle HTTP request | ||||
-------------------------------------- | -------------------------------------- | ||||