X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F40compose_connection.t;h=6cd62fff00f590b2b27352bdb9ca244022e27362;hb=65d351219882184861384aedac6f251b6797d0d7;hp=051ab9ba37f8ae25006d2fb914a8bb4dfdfd2e17;hpb=9345b14c6c86aa8888bf5d47a569ee9bbde24f47;p=dbsrgits%2FDBIx-Class.git diff --git a/t/40compose_connection.t b/t/40compose_connection.t index 051ab9b..6cd62ff 100644 --- a/t/40compose_connection.t +++ b/t/40compose_connection.t @@ -16,4 +16,15 @@ warnings_exist { DBICTest->init_schema( compose_connection => 1, sqlite_use_file cmp_ok(DBICTest->resultset('Artist')->count, '>', 0, 'count is valid'); +# cleanup globals so we do not trigger the leaktest +for ( map { DBICTest->schema->class($_) } DBICTest->schema->sources ) { + $_->class_resolver(undef); + $_->resultset_instance(undef); + $_->result_source_instance(undef); +} +{ + no warnings qw/redefine once/; + *DBICTest::schema = sub {}; +} + done_testing;