From 584ed53778b213e158b092184af773fe2149f3b0 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 10 Jul 2008 10:27:43 +0000 Subject: [PATCH] Add a testcase for the sema operations git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2916 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/a00008.vtc | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/a00008.vtc diff --git a/varnish-cache/bin/varnishtest/tests/a00008.vtc b/varnish-cache/bin/varnishtest/tests/a00008.vtc new file mode 100644 index 00000000..1089100b --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00008.vtc @@ -0,0 +1,51 @@ +# $Id: a00007.vtc 2906 2008-07-08 10:29:07Z phk $ + +test "Sema operations" + +server s1 -listen 127.0.0.1:9080 { + rxreq + sema r1 sync 4 + delay .9 + txresp +} -start + +server s2 -listen 127.0.0.1:9081 { + rxreq + sema r1 sync 4 + delay .6 + txresp +} -start + +server s3 -listen 127.0.0.1:9082 { + rxreq + sema r1 sync 4 + delay .2 + txresp +} -start + +client c1 -connect 127.0.0.1:9080 { + delay .2 + txreq + rxresp + sema r1 sync 4 +} -start + +client c2 -connect 127.0.0.1:9081 { + delay .6 + txreq + rxresp + sema r1 sync 4 +} -start + +client c3 -connect 127.0.0.1:9082 { + delay .9 + txreq + rxresp + sema r1 sync 4 +} -start + +# Wait for all servers to have received requests +sema r1 sync 4 + +# Wait for all clients to have received responses +sema r1 sync 4 -- 2.39.5