Fix spurious ROLLBACK statements when a TxnScopeGuard fails a deferred commit
[dbsrgits/DBIx-Class.git] / t / storage / debug.t
index e023fff..6868795 100644 (file)
@@ -2,6 +2,8 @@ use strict;
 use warnings;
 no warnings 'once';
 
+BEGIN { $ENV{DBICTEST_VIA_REPLICATED} = 0 }
+
 use Test::More;
 use Test::Exception;
 use Try::Tiny;
@@ -69,11 +71,12 @@ my $exception = try {
   open(STDERR, '>&STDERRCOPY');
 };
 
-like $exception, qr/
+ok $exception =~ /
   \QDuplication of STDERR for debug output failed (perhaps your STDERR is closed?)\E
     .+
   \Qat @{[__FILE__]} line $exception_line_number\E$
-/xms;
+/xms
+  or diag "Unexpected exception text:\n\n$exception\n";
 
 my @warnings;
 $exception = try {