[master] 121356d90 vtc: Stabilize and reorganize b15
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Sun Jun 27 11:46:06 UTC 2021
commit 121356d9060c9efdfe89d840fd84f710e83a164e
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Sun Jun 27 13:34:18 2021 +0200
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.
diff --git a/bin/varnishtest/tests/b00015.vtc b/bin/varnishtest/tests/b00015.vtc
index 396da7899..4e7ff3f3e 100644
--- a/bin/varnishtest/tests/b00015.vtc
+++ b/bin/varnishtest/tests/b00015.vtc
@@ -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
More information about the varnish-commit
mailing list