r2859 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jun 27 15:12:02 CEST 2008
Author: phk
Date: 2008-06-27 15:12:02 +0200 (Fri, 27 Jun 2008)
New Revision: 2859
Added:
trunk/varnish-cache/bin/varnishtest/tests/c00014.vtc
Log:
Test busy then pass
Added: trunk/varnish-cache/bin/varnishtest/tests/c00014.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00014.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00014.vtc 2008-06-27 13:12:02 UTC (rev 2859)
@@ -0,0 +1,39 @@
+# $Id$
+
+test "Test parking second request on backend delay, then pass"
+
+server s1 {
+ rxreq
+ expect req.url == "/foo"
+ send "HTTP/1.1 200 Ok\r\nContent-Length: 12\r\n\r\n"
+ delay .5
+ send "line1\n"
+ delay .5
+ send "line2\n"
+
+ rxreq
+ expect req.url == "/foo"
+ txresp -body "foobar"
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_fetch {
+ pass;
+ }
+} -start
+
+client c1 {
+ txreq -url "/foo"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.content-length == 12
+ expect resp.http.x-varnish == "1001"
+} -start
+delay .2
+client c2 {
+ txreq -url "/foo"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.content-length == 6
+ expect resp.http.x-varnish == "1002"
+} -start
More information about the varnish-commit
mailing list