X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Ftxn.t;h=f8a729f4ba7410c89a3c14cf8473d2a9d82dc726;hb=c5915b4555c90082664942a4485bee970a8ea8d2;hp=4c6d50558006ad9a7476f2e06efbb502a4ccfa1a;hpb=b74b15b066a19f07b575883abd397ea4d3b045db;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/txn.t b/t/storage/txn.t index 4c6d505..f8a729f 100644 --- a/t/storage/txn.t +++ b/t/storage/txn.t @@ -107,6 +107,7 @@ for my $want (0,1) { is ($schema->storage->transaction_depth, 0, 'Start outside txn'); my @pids; + SKIP: for my $action ( sub { my $s = shift; @@ -129,8 +130,13 @@ for my $want (0,1) { }, ) { my $pid = fork(); - die "Unable to fork: $!\n" - if ! defined $pid; + + if( ! defined $pid ) { + skip "EAGAIN encountered, your system is likely bogged down: skipping forking test", 1 + if $! == Errno::EAGAIN(); + + die "Unable to fork: $!" + } if ($pid) { push @pids, $pid; @@ -206,8 +212,13 @@ sub _test_forking_action { if $^O eq 'MSWin32'; my $pid = fork(); - die "Unable to fork: $!\n" - if ! defined $pid; + if( ! defined $pid ) { + + skip "EAGAIN encountered, your system is likely bogged down: skipping forking test", 1 + if $! == Errno::EAGAIN(); + + die "Unable to fork: $!" + } if ($pid) { push @pids, $pid;