From: Peter Rabbitson Date: Sat, 15 Jan 2011 10:31:32 +0000 (+0100) Subject: Add back populate stress-test (inadvertently broken in d35a6fed) X-Git-Tag: v0.08127~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=569b9fe6a61988079d0ad1874aede8510daa38c7;p=dbsrgits%2FDBIx-Class.git Add back populate stress-test (inadvertently broken in d35a6fed) --- diff --git a/t/100populate.t b/t/100populate.t index c2c9491..0bd49da 100644 --- a/t/100populate.t +++ b/t/100populate.t @@ -6,6 +6,7 @@ use Test::Exception; use lib qw(t/lib); use DBICTest; use Path::Class::File (); +use List::Util qw/shuffle/; my $schema = DBICTest->init_schema(); @@ -18,10 +19,10 @@ my $schema = DBICTest->init_schema(); # [ 10000, "ntn" ], my $start_id = 'populateXaaaaaa'; -my $rows = 10; +my $rows = 10_000; my $offset = 3; -$schema->populate('Artist', [ [ qw/artistid name/ ], map { [ ($_ + $offset) => $start_id++ ] } ( 1 .. $rows ) ] ); +$schema->populate('Artist', [ [ qw/artistid name/ ], map { [ ($_ + $offset) => $start_id++ ] } shuffle ( 1 .. $rows ) ] ); is ( $schema->resultset ('Artist')->search ({ name => { -like => 'populateX%' } })->count, $rows,