r1814 - trunk/varnish-tools/regress/lib/Varnish/Test

des at projects.linpro.no des at projects.linpro.no
Wed Aug 8 14:08:25 CEST 2007


Author: des
Date: 2007-08-08 14:08:25 +0200 (Wed, 08 Aug 2007)
New Revision: 1814

Modified:
   trunk/varnish-tools/regress/lib/Varnish/Test/Engine.pm
   trunk/varnish-tools/regress/lib/Varnish/Test/Varnish.pm
Log:
Start varnishd with '-n regress'.
Handle server failures gracefully.


Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Engine.pm
===================================================================
--- trunk/varnish-tools/regress/lib/Varnish/Test/Engine.pm	2007-08-08 11:00:26 UTC (rev 1813)
+++ trunk/varnish-tools/regress/lib/Varnish/Test/Engine.pm	2007-08-08 12:08:25 UTC (rev 1814)
@@ -59,7 +59,8 @@
 
     %config = ('server_address' => 'localhost:8081',
 	       'varnish_address' => 'localhost:8080',
-	       'storage_spec' => 'file,/tmp/regress.bin,512k',
+	       'varnish_name' => 'regress',
+	       'storage_spec' => 'file,regress.bin,512k',
 	       %config);
 
     my $self = bless({ 'mux' => IO::Multiplex->new,
@@ -107,9 +108,10 @@
 
     $self->{'wait_for'} = \@wait_for;
     $self->{'in_loop'} = 1;
-    $self->{'mux'}->loop;
+    eval { $self->{'mux'}->loop; };
     delete $self->{'in_loop'};
     delete $self->{'wait_for'};
+    die $@ if ($@);
 
     # Loop has now been paused due to the occurrence of an event we
     # were waiting for. This event is always found in the front of the

Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Varnish.pm
===================================================================
--- trunk/varnish-tools/regress/lib/Varnish/Test/Varnish.pm	2007-08-08 11:00:26 UTC (rev 1813)
+++ trunk/varnish-tools/regress/lib/Varnish/Test/Varnish.pm	2007-08-08 12:08:25 UTC (rev 1814)
@@ -96,6 +96,7 @@
 
 	my @opts = ('-d', '-d',
 		    '-s', $engine->{'config'}->{'storage_spec'},
+		    '-n', $engine->{'config'}->{'varnish_name'},
 		    '-a', $engine->{'config'}->{'varnish_address'},
 		    '-b', $engine->{'config'}->{'server_address'});
 




More information about the varnish-commit mailing list