r2851 - trunk/varnish-cache/bin/varnishtest/tests

phk at projects.linpro.no phk at projects.linpro.no
Fri Jun 27 14:30:42 CEST 2008


Author: phk
Date: 2008-06-27 14:30:42 +0200 (Fri, 27 Jun 2008)
New Revision: 2851

Added:
   trunk/varnish-cache/bin/varnishtest/tests/b00012.vtc
Log:
Add testcase for pipelining



Added: trunk/varnish-cache/bin/varnishtest/tests/b00012.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00012.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00012.vtc	2008-06-27 12:30:42 UTC (rev 2851)
@@ -0,0 +1,34 @@
+# $Id$
+
+test "Check pipelining"
+
+varnish v1 -arg "-h simple_list -b 127.0.0.1:9080" -start
+
+server s1 {
+	rxreq 
+	expect req.url == "/foo"
+	txresp -body "foo"
+	rxreq 
+	expect req.url == "/bar"
+	txresp -body "foobar"
+}
+
+server s1 -start 
+
+client c1 {
+	send "GET /foo HTTP/1.1\n\nGET /bar HTTP/1.1\n\nGET /bar HTTP/1.1\n\n"
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 3
+	expect resp.http.x-varnish == "1001"
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 6
+	expect resp.http.x-varnish == "1002"
+	rxresp
+	expect resp.status == 200
+	expect resp.http.content-length == 6
+	expect resp.http.x-varnish == "1003 1002"
+}
+
+client c1 -run




More information about the varnish-commit mailing list