Branch Coverage

blib/lib/DBIx/Class/Storage/DBI/mysql/Retryable.pm
Criterion Covered Total %
branch 56 84 66.6


line true false branch
200 2 3 if @_
208 2 20 if @_
214 2 2 $_[0] ? :
4 0 if @_
215 2 2 $self->enable_retryable ? :
234 20 8 if $timeout == -1
254 3 5 if ($type eq 'dbi') { }
5 0 elsif ($type eq 'session') { }
256 0 3 if $self->aggressive_timeouts
262 0 5 if $self->aggressive_timeouts
277 11 3 unless $self->_retryable_current_timeout and $self->enable_retryable
292 0 0 unless $self->_retryable_current_timeout and $self->enable_retryable
299 0 0 if (ref $info eq "CODE")
300 0 0 unless $ENV{'DBIC_RETRYABLE_DONT_SET_CONNECT_SESSION_VARS'}
320 0 0 unless $dbi_attr and ref $dbi_attr eq "HASH"
334 18 5 unless $self->_retryable_current_timeout and $self->enable_retryable
350 5 0 if ($dbh)
356 0 5 if (my $error = $@)
357 0 0 unless do { local $@; $self->parse_error_class->new($error)->is_transient }
363 0 0 if $error =~ m[Failed \w+ coderef: .+, attempts: \d+ / \d+, timer: [\d\.]+ / [\d\.]+ sec, last exception: ]
365 0 0 if $self->warn_on_retryable_error
372 2 19 unless $self->enable_retryable
407 18 23 @_ ? :
412 11 48 if ($call_type eq 'txn_do') { }
28 20 elsif ($call_type eq 'dbh_do') { }
20 0 elsif ($call_type eq 'connect') { }
419 16 25 if $self->{'_in_do_block'} or $self->transaction_depth
426 20 5 if $timeout == -1
478 2 19 unless $parsed_error->is_transient
481 0 19 if $self->warn_on_retryable_error
484 1 18 if ($sleep_time == -1) { }
10 8 elsif ($sleep_time) { }
487 0 18 if ($new_timeout > 0)
495 5 13 unless ($parsed_error->error_type eq "lock")
503 0 18 if (my $connect_error = $@)
513 2 17 unless $self->enable_retryable
535 0 5 unless $self->enable_retryable
573 0 25 if ($needs_resetting)
605 0 3 if ($self->_failed_attempt_count <= $self->retries_before_error_prefix)
626 3 23 if $exception_prefix
628 23 3 unless $exception_prefix
632 3 0 if (builtin::blessed($error) and $error->isa('DBIx::Class::Exception')) { }