Mailing List Archive

r3294 - trunk/varnish-cache/bin/varnishtest/tests
Author: phk
Date: 2008-10-14 11:15:50 +0200 (Tue, 14 Oct 2008)
New Revision: 3294

Modified:
trunk/varnish-cache/bin/varnishtest/tests/b00019.vtc
Log:
Expand the -repeat 6 in the server clause, this seems to make the
test work reliably on my machine.

Also set the reponse text to a recognizable text for improved logreading
should it fail again.



Modified: trunk/varnish-cache/bin/varnishtest/tests/b00019.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00019.vtc 2008-10-13 09:21:06 UTC (rev 3293)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00019.vtc 2008-10-14 09:15:50 UTC (rev 3294)
@@ -2,9 +2,19 @@

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

varnish v1 -vcl+backend {
@@ -15,10 +25,13 @@
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