From 1b7a0c289bfcf5ddaf111bd58c91ce03605bf0c3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 May 2015 17:58:45 +0200 Subject: [PATCH] Bug 14197: Remove the warning on destroying TestBuilder objects This module will be called by db_dependent tests, which already create a transaction. TestBuilder creates a new one (which is certainly useless) and the rollback does not do anything. To see the warning see patches on bug 14045. --- t/lib/TestBuilder.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index 72364e3..5c8ee8b 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -315,7 +315,9 @@ sub _gen_blob { sub DESTROY { my $self = shift; - $self->schema->txn_rollback(); + eval { + $self->schema->txn_rollback(); + }; } -- 2.1.0