From a0a5c0c0cd7c7e606ca15c360c8e3c3a7f7f8c04 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 22 Jul 2008 08:21:29 +0000 Subject: [PATCH] Add a testcase which panics the child, see the manager restart it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2985 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/v00010.vtc | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/v00010.vtc diff --git a/varnish-cache/bin/varnishtest/tests/v00010.vtc b/varnish-cache/bin/varnishtest/tests/v00010.vtc new file mode 100644 index 00000000..3ef44869 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00010.vtc @@ -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 -- 2.39.5