handle completely bizarre edge case
[scpubgit/Q-Branch.git] / t / 01generate.t
index 008c7ca..16f4d0d 100644 (file)
@@ -16,12 +16,6 @@ use SQL::Abstract;
 #
 #################
 
-# DBIx::Class requires a nest warning to be emitted once but the private
-# method it overrode to do so no longer exists; here we cancel said warning
-# to avoid disturbing the SQLA tests
-
-$SQL::Abstract::Nest_Warning_Emitted++;
-
 my @tests = (
       {
               func   => 'select',
@@ -869,6 +863,13 @@ for my $t (@tests) {
     }
     else {
       lives_ok(sub {
+        alarm(1); local $SIG{ALRM} = sub {
+          no warnings 'redefine';
+          my $orig = Carp->can('caller_info');
+          local *Carp::caller_info = sub { return if $_[0] > 20; &$orig };
+          print STDERR "ARGH ($SQL::Abstract::Default_Scalar_To): ".Carp::longmess();
+          die "timed out";
+        };
         warnings_like(
           sub { $cref->() },
           $t->{warns} || [],