test-hgweb: fix shutdown race stable
authorMatt Mackall <mpm@selenic.com>
Fri, 23 Jan 2015 17:47:04 -0600
branchstable
changeset 23952 ea61e278ae92
parent 23951 42f3042cc17f
child 23953 af73c05e735a
test-hgweb: fix shutdown race Logfiles weren't necessarily being flushed before being read.
tests/test-hgweb.t
--- a/tests/test-hgweb.t	Thu Jan 22 00:08:13 2015 +0900
+++ b/tests/test-hgweb.t	Fri Jan 23 17:47:04 2015 -0600
@@ -595,11 +595,14 @@
   Internal Server Error (no-eol)
   [1]
 
+  $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   $ head -1 errors.log
   .* Exception happened during processing request '/raiseerror': (re)
 
 Uncaught exception after partial content sent
 
+  $ hg --config extensions.hgweberror=$TESTDIR/hgweberror.py serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
   $ $TESTDIR/get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type
   200 Script output follows
   transfer-encoding: chunked
@@ -608,4 +611,5 @@
   partial content
   Internal Server Error (no-eol)
 
+  $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   $ cd ..