From a85844465853fb63945f449c1f84d60e385131e9 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 20 Jun 2008 15:34:14 +0000 Subject: [PATCH] Add a TCP reuse testcase, and polish the a00006 case a bit git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2748 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/a00006.vtc | 10 +------- .../bin/varnishtest/tests/a00007.vtc | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 varnish-cache/bin/varnishtest/tests/a00007.vtc diff --git a/varnish-cache/bin/varnishtest/tests/a00006.vtc b/varnish-cache/bin/varnishtest/tests/a00006.vtc index 97661989..3cb1671d 100644 --- a/varnish-cache/bin/varnishtest/tests/a00006.vtc +++ b/varnish-cache/bin/varnishtest/tests/a00006.vtc @@ -1,6 +1,6 @@ # $Id$ -test "dual shared client HTTP transactions" +test "bidirectional message bodies" server s1 -listen :9080 { rxreq @@ -26,12 +26,4 @@ client c1 -connect localhost:9080 { client c1 -run -client c1 -connect localhost:9081 { - txreq - rxresp - expect resp.proto == HTTP/1.1 - expect resp.status == 200 - expect resp.msg == Ok -} - server s1 -wait diff --git a/varnish-cache/bin/varnishtest/tests/a00007.vtc b/varnish-cache/bin/varnishtest/tests/a00007.vtc new file mode 100644 index 00000000..34afcb73 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/a00007.vtc @@ -0,0 +1,25 @@ +# $Id$ + +test "TCP reuse" + +server s1 -listen :9080 { + rxreq + expect req.url == "/1" + txresp -hdr "Length: 10" -body "123456789\n" + rxreq + expect req.url == "/2" + txresp -hdr "Length: 10" -body "987654321\n" +} + +server s1 -start + +client c1 -connect localhost:9080 { + txreq -url "/1" -req "POST" -hdr "Length: 10" -body "abcdefghi\n" + rxresp + txreq -url "/2" -req "POST" -hdr "Length: 10" -body "ihgfedcba\n" + rxresp +} + +client c1 -run + +server s1 -wait -- 2.39.5