X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fdetach.t;fp=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fdetach.t;h=f833346749e3016edc5b904f7d2a3c1dd8aea14d;hb=232fd39402371d9550ad97d92a4ceafd283874b0;hp=7ea99b499d561f84ff00de04387a2ed6c3244dd7;hpb=1c773d181e88f0e97195456526b1cf222a80b8e4;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/detach.t b/t/live/component/controller/action/detach.t index 7ea99b4..f833346 100644 --- a/t/live/component/controller/action/detach.t +++ b/t/live/component/controller/action/detach.t @@ -6,10 +6,24 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 180; +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } + +use Test::More tests => 18*$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 { { my @expected = qw[ TestApp::Controller::Action::Detach->begin