[Commented On] D12069: test-http-bad-server: use the new pattern-reading for a test-case

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Mon Jan 24 18:21:06 UTC 2022


baymax added a comment.
baymax updated this revision to Diff 31893.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12069?vs=31772&id=31893

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12069/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D12069

AFFECTED FILES
  tests/test-http-bad-server.t

CHANGE DETAILS

diff --git a/tests/test-http-bad-server.t b/tests/test-http-bad-server.t
--- a/tests/test-http-bad-server.t
+++ b/tests/test-http-bad-server.t
@@ -91,7 +91,10 @@
 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
   $ hg clone http://localhost:$HGPORT/ clone
   abort: error: bad HTTP status line: * (glob)
@@ -100,7 +103,7 @@
   $ killdaemons.py $DAEMON_PIDS
 
   $ 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)
   read limit reached; closing socket
 



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220124/175dd45e/attachment-0002.html>


More information about the Mercurial-patches mailing list