Further delay empty weakregistry assertions
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest.pm
index aa20b0c..e9c83fb 100644 (file)
@@ -343,7 +343,11 @@ sub init_schema {
 }
 
 END {
+  # Make sure we run after any cleanup in other END blocks
+  require B;
+  push @{ B::end_av()->object_2svref }, sub {
     assert_empty_weakregistry($weak_registry, 'quiet');
+  };
 }
 
 =head2 deploy_schema