Patchwork [remotefilelog-ext,check-batching] test-http: save access log and make sure we actually use request batching

login
register
mail settings
Submitter Augie Fackler
Date Aug. 21, 2015, 5:02 p.m.
Message ID <7305f63021fe06cac75e.1440176574@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/10244/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 21, 2015, 5:02 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1440175900 14400
#      Fri Aug 21 12:51:40 2015 -0400
# Node ID 7305f63021fe06cac75ebcd288c56c33d86d7d0f
# Parent  802538ce2a9be544828417ff0a86aba847a63307
test-http: save access log and make sure we actually use request batching
Durham Goode - Aug. 24, 2015, 10:55 p.m.
On 8/21/15 10:02 AM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1440175900 14400
> #      Fri Aug 21 12:51:40 2015 -0400
> # Node ID 7305f63021fe06cac75ebcd288c56c33d86d7d0f
> # Parent  802538ce2a9be544828417ff0a86aba847a63307
> test-http: save access log and make sure we actually use request batching
>
Queued and pushed. Thanks!

Patch

diff --git a/tests/test-http.t b/tests/test-http.t
--- a/tests/test-http.t
+++ b/tests/test-http.t
@@ -8,7 +8,7 @@ 
   > EOF
   $ echo x > x
   $ hg commit -qAm x
-  $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
+  $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log -A ../access.log
 
 Build a query string for later use:
   $ GET=`hg debugdata -m 0 | python -c \
@@ -20,6 +20,9 @@  Build a query string for later use:
   $ hgcloneshallow http://localhost:$HGPORT/ shallow -q
   1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
 
+  $ grep batch access.log | grep getfile
+  * "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=getfile+node%3D1406e74118627694268417491f018a4a883152f0%2Cfile%3Dx (glob)
+
 Clear filenode cache so we can test fetching with a modified batch size
   $ rm -r $TESTTMP/hgcache
 Now do a fetch with a large batch size so we're sure it works