From: phk Date: Fri, 27 Jun 2008 13:12:02 +0000 (+0000) Subject: Test busy then pass X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96bd917bef9b51d1450e306322ff109ef99284a5;p=varnish Test busy then pass git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2859 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/c00014.vtc b/varnish-cache/bin/varnishtest/tests/c00014.vtc new file mode 100644 index 00000000..018d7091 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/c00014.vtc @@ -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