summaryrefslogtreecommitdiff
path: root/dist/Tie-File/t/29_downcopy.t
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Tie-File/t/29_downcopy.t')
-rw-r--r--dist/Tie-File/t/29_downcopy.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/dist/Tie-File/t/29_downcopy.t b/dist/Tie-File/t/29_downcopy.t
index 9fd175c69e..1fbc852821 100644
--- a/dist/Tie-File/t/29_downcopy.t
+++ b/dist/Tie-File/t/29_downcopy.t
@@ -274,13 +274,15 @@ sub try {
}
my $o = tie my @lines, 'Tie::File', $file or die $!;
+ # allocate more time when are running tests in parallel
+ my $alarm_time = $ENV{TEST_JOBS} || $ENV{HARNESS_OPTIONS} ? 20 : 10;
local $SIG{ALRM} = sub { die "Alarm clock" };
- my $a_retval = eval { alarm(5) unless $^P; $o->_downcopy($newdata, $pos, $len) };
+ my $a_retval = eval { alarm($alarm_time) unless $^P; $o->_downcopy($newdata, $pos, $len) };
my $err = $@;
undef $o; untie @lines; alarm(0);
if ($err) {
if ($err =~ /^Alarm clock/) {
- print STDERR "# $0 Timeout at test $N\n";
+ print STDERR "# $0 Timeout after $alarm_time seconds at test $N\n";
print "not ok $N\n"; $N++;
print "not ok $N\n"; $N++;
if (defined $len) {