X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fprivate.t;h=6ca058041ff8d771d54e0d02f061d49bcbfe8b2e;hp=fda96ea4ab951a14feadfad33afe3fd52a48bf52;hb=587b0f5882d4f5e128ae082758da37b065a3efde;hpb=d8c66af52b5353c93b1816e19c0f1cac69bc5ad1 diff --git a/t/live/component/controller/action/private.t b/t/live/component/controller/action/private.t index fda96ea..6ca0580 100644 --- a/t/live/component/controller/action/private.t +++ b/t/live/component/controller/action/private.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/private/one'), 'Request' );