test work reliably on my machine.
Also set the reponse text to a recognizable text for improved logreading
should it fail again.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3294
d4fa192b-c00b-0410-8231-
f00ffab90ce4
test "Check that max_restarts works and that we don't fall over"
-server s1 -repeat 6 {
+server s1 {
+ rxreq
+ txresp -body "012345\n"
+ rxreq
+ txresp -body "012345\n"
+ rxreq
+ txresp -body "012345\n"
+ rxreq
+ txresp -body "012345\n"
+ rxreq
+ txresp -body "012345\n"
rxreq
txresp -body "012345\n"
} -start
sub vcl_error {
if (req.restarts == 2) {
set obj.status = 200;
+ set obj.response = "restart=2";
} elsif (req.restarts > 2) {
set obj.status = 501;
+ set obj.response = "restart>2";
} elsif (req.restarts < 2) {
set obj.status = 500;
+ set obj.response = "restart<2";
}
}
} -start