From 0b6460b1916aaa6b08f2f12fd3d6832c3715db3f 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. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- 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 5d3157a356..72b087da31 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -357,7 +357,9 @@ sub _gen_blob { sub DESTROY { my $self = shift; - $self->schema->txn_rollback(); + eval { + $self->schema->txn_rollback(); + }; } -- 2.39.5