r2129 - trunk/varnish-tools/regress/lib/Varnish/Test/Case

des at projects.linpro.no des at projects.linpro.no
Fri Oct 19 11:46:58 CEST 2007


Author: des
Date: 2007-10-19 11:46:58 +0200 (Fri, 19 Oct 2007)
New Revision: 2129

Modified:
   trunk/varnish-tools/regress/lib/Varnish/Test/Case/Pipeline.pm
Log:
When testing pipelined POST requests, send enough data to actually exercise
request copying loop.


Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Case/Pipeline.pm
===================================================================
--- trunk/varnish-tools/regress/lib/Varnish/Test/Case/Pipeline.pm	2007-10-19 09:35:09 UTC (rev 2128)
+++ trunk/varnish-tools/regress/lib/Varnish/Test/Case/Pipeline.pm	2007-10-19 09:46:58 UTC (rev 2129)
@@ -41,6 +41,8 @@
     'Williams' => "I have always depended upon the kindness of strangers.",
 );
 
+our $REPS = 4096;
+
 our $VCL = <<EOVCL;
 sub vcl_recv {
     if (req.request == "POST") {
@@ -71,7 +73,7 @@
 
     my $client = $self->new_client;
     foreach my $author (sort keys %CONTENT) {
-	$self->post($client, "/$author", [], $CONTENT{$author});
+	$self->post($client, "/$author", [], $CONTENT{$author} x $REPS);
     }
     foreach my $author (sort keys %CONTENT) {
 	$self->wait();
@@ -89,7 +91,7 @@
     my ($author) = ($request->uri =~ m/(\w+)$/);
     if ($CONTENT{$author}) {
 	if ($request->method eq 'POST') {
-	    die unless $request->content =~ qr/\Q$CONTENT{$author}\E/;
+	    die unless $request->content eq $CONTENT{$author} x $REPS;
 	}
 	$response->content($CONTENT{$author});
     } else {




More information about the varnish-commit mailing list