X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fmultipath.t;h=faa043bd904be890806175983e2f5fbb1920a82d;hb=587b0f5882d4f5e128ae082758da37b065a3efde;hp=a5edae0d2e470240eef8c621b244c966f81350b7;hpb=d8c66af52b5353c93b1816e19c0f1cac69bc5ad1;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/multipath.t b/t/live/component/controller/action/multipath.t index a5edae0..faa043b 100644 --- a/t/live/component/controller/action/multipath.t +++ b/t/live/component/controller/action/multipath.t @@ -6,16 +6,29 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 160; -use Catalyst::Test 'TestApp'; - my $content = q/foo bar baz /; -for ( 1 .. 10 ) { +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } + +use Test::More tests => 16*$iters; +use Catalyst::Test 'TestApp'; + +if ( $ENV{CAT_BENCHMARK} ) { + require Benchmark; + Benchmark::timethis( $iters, \&run_tests ); +} +else { + for ( 1 .. $iters ) { + run_tests(); + } +} +sub run_tests { # Local { ok(