comparison tests/test-http-bad-server.t @ 48638:1ae83cafaa39

test-http-bad-server: use the new pattern-reading for a test-case 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. Differential Revision: https://phab.mercurial-scm.org/D12069
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 23 Jan 2022 19:51:00 +0100
parents b169767ecc8c
children ebd515d129c6
comparison
equal deleted inserted replaced
48637:5154f2025d8a 48638:1ae83cafaa39
89 $ rm -f error.log 89 $ rm -f error.log
90 90
91 Same failure, but server reads full HTTP request line 91 Same failure, but server reads full HTTP request line
92 ----------------------------------------------------- 92 -----------------------------------------------------
93 93
94 $ hg serve --config badserver.close-after-recv-bytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log 94 $ hg serve \
95 > --config badserver.close-after-recv-patterns="GET /\?cmd=capabilities" \
96 > --config badserver.close-after-recv-bytes=7 \
97 > -p $HGPORT -d --pid-file=hg.pid -E error.log
95 $ cat hg.pid > $DAEMON_PIDS 98 $ cat hg.pid > $DAEMON_PIDS
96 $ hg clone http://localhost:$HGPORT/ clone 99 $ hg clone http://localhost:$HGPORT/ clone
97 abort: error: bad HTTP status line: * (glob) 100 abort: error: bad HTTP status line: * (glob)
98 [100] 101 [100]
99 102
100 $ killdaemons.py $DAEMON_PIDS 103 $ killdaemons.py $DAEMON_PIDS
101 104
102 $ cat error.log 105 $ cat error.log
103 readline(40 from ~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n 106 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
104 readline(7 from *) -> (7) Accept- (glob) 107 readline(7 from *) -> (7) Accept- (glob)
105 read limit reached; closing socket 108 read limit reached; closing socket
106 109
107 $ rm -f error.log 110 $ rm -f error.log
108 111