Commit 31ea898e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a testcase for backend retries.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5104 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c47b2dbc
...@@ -4,33 +4,28 @@ ...@@ -4,33 +4,28 @@
server s1 -repeat 1 { server s1 -repeat 1 {
rxreq rxreq
txresp \ txresp -bodylen 5
-hdr "Connection: close" \ rxreq
-hdr "Test1: foobar" \ accept
-hdr "Test2: foobar" \ rxreq
-body "012345\n" txresp -bodylen 6
} } -start
varnish v1 -launch
varnish v1 -vcl+backend { varnish v1 -vcl+backend {
sub vcl_recv { sub vcl_recv {
pipe; return(pass);
} }
} } -start
varnish v1 -start
server s1 -start
client c1 { client c1 {
txreq -url "/" txreq
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
} expect resp.bodylen == 5
txreq
client c1 -run rxresp
expect resp.status == 200
# server s1 -wait expect resp.bodylen == 6
} -run
# varnish v1 -wait varnish v1 -expect backend_retry == 1
# $Id$
test "Backend close retry"
server s1 -repeat 1 {
rxreq
txresp -bodylen 5
rxreq
accept
rxreq
txresp -bodylen 6
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
return(pass);
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.bodylen == 5
txreq
rxresp
expect resp.status == 200
expect resp.bodylen == 6
} -run
varnish v1 -expect backend_retry == 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment