Commit 121356d9 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vtc: Stabilize and reorganize b15

While in itself this is not a slow test, on a loaded system the
connection failures can degrade the run time dramatically, like 20
times slower.

To save some time here and there, some client sessions were folded
together where it made sense. Also no two clients share the same name
to make it easier to spot the offending one in a test log.

More importantly, the holddown test at the end which concerns the very
first VCL is now put at the beginning where it belongs, and also where
tweaking backend_remote_error_holddown will actually have the desired
effect.
parent 3dcb2a50
......@@ -2,6 +2,8 @@ varnishtest "Check synthetic error page caching"
# First test that an internally generated error is not cached
varnish v1 -cliok "param.set backend_remote_error_holddown 60"
varnish v1 -vcl {
backend foo {
.host = "${bad_backend}";
......@@ -13,18 +15,15 @@ client c1 {
rxresp
expect resp.status == 503
expect resp.http.X-varnish == "1001"
} -run
delay .1
client c1 {
txreq -url "/"
rxresp
expect resp.status == 503
expect resp.http.X-varnish == "1004"
expect resp.http.X-varnish == "1003"
} -run
delay .1
varnish v1 -expect VBE.vcl1.foo.fail_econnrefused > 0
varnish v1 -expect VBE.vcl1.foo.helddown > 0
# Then check that a cacheable error from the backend is
......@@ -42,23 +41,19 @@ varnish v1 -vcl+backend {
}
}
client c1 {
client c2 {
txreq -url "/"
rxresp
expect resp.status == 301
expect resp.http.X-varnish == "1007"
} -run
expect resp.http.X-varnish == "1006"
delay .1
client c1 {
txreq -url "/"
rxresp
expect resp.status == 301
expect resp.http.X-varnish == "1010 1008"
expect resp.http.X-varnish == "1008 1007"
} -run
delay .1
server s1 -wait
# Then check that a non-cacheable error from the backend can be
......@@ -67,8 +62,6 @@ server s1 {
txresp -status 502
} -start
varnish v1 -cliok "param.set backend_remote_error_holddown 10"
varnish v1 -vcl+backend {
sub vcl_backend_response {
if (beresp.status == 502) {
......@@ -77,23 +70,14 @@ varnish v1 -vcl+backend {
}
}
client c1 {
client c3 {
txreq -url "/2"
rxresp
expect resp.status == 502
expect resp.http.X-varnish == "1012"
} -run
expect resp.http.X-varnish == "1010"
delay .1
client c1 {
txreq -url "/2"
rxresp
expect resp.status == 502
expect resp.http.X-varnish == "1015 1013"
expect resp.http.X-varnish == "1012 1011"
} -run
delay .1
varnish v1 -expect VBE.vcl1.foo.fail_econnrefused > 0
varnish v1 -expect VBE.vcl1.foo.helddown > 0
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