r2985 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Tue Jul 22 10:21:29 CEST 2008
Author: phk
Date: 2008-07-22 10:21:29 +0200 (Tue, 22 Jul 2008)
New Revision: 2985
Added:
trunk/varnish-cache/bin/varnishtest/tests/v00010.vtc
Log:
Add a testcase which panics the child, see the manager restart it.
Added: trunk/varnish-cache/bin/varnishtest/tests/v00010.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00010.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00010.vtc 2008-07-22 08:21:29 UTC (rev 2985)
@@ -0,0 +1,41 @@
+# $Id: v00005.vtc 2906 2008-07-08 10:29:07Z phk $
+
+test "VCL: check panic and restart"
+
+server s1 {
+ rxreq
+ txresp -hdr "Foo: bar" -body "abcdef\n"
+ rxreq
+ txresp -hdr "Panic: please" -body "012345\n"
+ sema r1 sync 2
+} -start
+
+varnish v1 -vcl+backend {
+
+ sub vcl_fetch {
+ if (obj.http.panic) {
+ panic "Had Panic header: " obj.http.panic;
+ }
+ }
+} -start -cli "param.set diag_bitmap 0x00001000"
+
+
+client c1 {
+ txreq -url "/"
+ rxresp
+ txreq -url "/foo"
+ # Don't expect answer, the server crashed.
+ sema r1 sync 2
+ delay .5
+} -run
+
+server s1 {
+ rxreq
+ txresp -hdr "Foo: foo" -body "abcdef\n"
+} -start
+
+client c1 {
+ txreq -url "/"
+ rxresp
+ expect resp.http.foo == "foo"
+} -run
More information about the varnish-commit
mailing list