Add all storage instances to the test suite leaktracing pool
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema.pm
index 1e5c564..285582d 100644 (file)
@@ -74,6 +74,13 @@ sub clone {
   $self;
 }
 
+sub connection {
+  my $self = shift->next::method(@_);
+  populate_weakregistry ( $weak_registry, $self->storage )
+    if $INC{'Test/Builder.pm'};
+  $self;
+}
+
 END {
   assert_empty_weakregistry($weak_registry, 'quiet');
 }