X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Flocal.t;fp=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Flocal.t;h=9c2f69e6bfa4e082c3315f7c841c878598da47bb;hb=232fd39402371d9550ad97d92a4ceafd283874b0;hp=47e872e9a5594db52822efb1e0efc081fd024def;hpb=1c773d181e88f0e97195456526b1cf222a80b8e4;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/local.t b/t/live/component/controller/action/local.t index 47e872e..9c2f69e 100644 --- a/t/live/component/controller/action/local.t +++ b/t/live/component/controller/action/local.t @@ -6,10 +6,24 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 240; +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } + +use Test::More tests => 24*$iters; use Catalyst::Test 'TestApp'; -for ( 1 .. 10 ) { +if ( $ENV{CAT_BENCHMARK} ) { + require Benchmark; + Benchmark::timethis( -$iters, \&run_tests ); +} +else { + for ( 1 .. $iters ) { + run_tests(); + } +} + +sub run_tests { { ok( my $response = request('http://localhost/action/local/one'), 'Request' );