X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F92storage_ping_count.t;h=07659cb5d528e17fc1aadb675c620434df3a9117;hb=a459ce7fc337cd8d2b37a4fb35cff73bdd3c32b2;hp=99872838c61d85ce907307542e10ec2a944c2f97;hpb=28be49a61823d8e7592ddd9c81e86066fd47e6ee;p=dbsrgits%2FDBIx-Class.git diff --git a/t/92storage_ping_count.t b/t/92storage_ping_count.t index 9987283..07659cb 100644 --- a/t/92storage_ping_count.t +++ b/t/92storage_ping_count.t @@ -1,20 +1,14 @@ use strict; use warnings; -# Stolen from 76joins.t (a good test for this purpose) - use Test::More; use lib qw(t/lib); use DBICTest; use Data::Dumper; use DBIC::SqlMakerTest; -plan tests => 1; - my $ping_count = 0; -my $schema = DBICTest->init_schema(); - { local $SIG{__WARN__} = sub {}; require DBIx::Class::Storage::DBI; @@ -27,6 +21,17 @@ my $schema = DBICTest->init_schema(); }; } + +# measure pings around deploy() separately +my $schema = DBICTest->init_schema( sqlite_use_file => 1, no_populate => 1 ); + +is ($ping_count, 0, 'no _ping() calls during deploy'); +$ping_count = 0; + + + +DBICTest->populate_schema ($schema); + # perform some operations and make sure they don't ping $schema->resultset('CD')->create({ @@ -52,3 +57,5 @@ $schema->txn_do(sub { }); is $ping_count, 0, 'no _ping() calls'; + +done_testing;