Fix misleading error on deployment_statements in void ctx
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Util.pm
index dc34406..1529f90 100644 (file)
@@ -76,7 +76,7 @@ sub dbg ($) {
 # This figure esentially means "how long can a single test hold a
 # resource before everyone else gives up waiting and aborts" or
 # in other words "how long does the longest test-group legitimally run?"
-my $lock_timeout_minutes = 15;  # yes, that's long, I know
+my $lock_timeout_minutes = 30;  # yes, that's long, I know
 my $wait_step_seconds = 0.25;
 
 sub await_flock ($$) {
@@ -104,11 +104,13 @@ sub await_flock ($$) {
       # prove -lj10 xt/extra/internals/
       #
       select( ( select(\*STDOUT), $|=1 )[0] );
-
-      print "#\n";
+      print STDOUT "#\n";
     }
   }
 
+  print STDERR "Lock timeout of $lock_timeout_minutes minutes reached: "
+    unless $res;
+
   return $res;
 }
 
@@ -123,7 +125,7 @@ sub local_umask ($) {
   croak "Setting umask failed: $!" unless defined $old_umask;
 
   scope_guard(sub {
-    local ($@, $!, $?);
+    local ( $!, $^E, $?, $@ );
 
     eval {
       defined(umask $old_umask) or die "nope";
@@ -282,7 +284,7 @@ sub slurp_bytes ($) {
 
 
 sub rm_rf ($) {
-  croak "No valid argument supplied to rm_rf()" unless length "$_[0]";
+  croak "No argument supplied to rm_rf()" unless length "$_[0]";
 
   return unless -e $_[0];