Branch Coverage

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


line true false branch
183 2 2 if @_
191 2 14 if @_
197 2 2 $_[0] ? :
4 0 if @_
198 2 2 $self->enable_retryable ? :
217 12 8 if $timeout == -1
237 3 5 if ($type eq 'dbi') { }
5 0 elsif ($type eq 'session') { }
239 0 3 if $self->aggressive_timeouts
245 0 5 if $self->aggressive_timeouts
260 7 3 unless $self->_retryable_current_timeout and $self->enable_retryable
275 0 0 unless $self->_retryable_current_timeout and $self->enable_retryable
282 0 0 if (ref $info eq 'CODE')
283 0 0 unless $ENV{'DBIC_RETRYABLE_DONT_SET_CONNECT_SESSION_VARS'}
303 0 0 unless $dbi_attr and ref $dbi_attr eq 'HASH'
317 13 5 unless $self->_retryable_current_timeout and $self->enable_retryable
329 5 0 if ($dbh)
335 0 5 if (my $error = $@)
336 0 0 unless do { local $@; $self->parse_error_class->new($error)->is_transient }
342 0 0 if $error =~ m[Failed \w+ coderef: .+, attempts: \d+ / \d+, timer: [\d\.]+ / [\d\.]+ sec, last exception: ]
344 0 0 if $self->warn_on_retryable_error
351 2 14 unless $self->enable_retryable
386 8 14 @_ ? :
391 1 34 if ($call_type eq 'txn_do') { }
19 15 elsif ($call_type eq 'dbh_do') { }
15 0 elsif ($call_type eq 'connect') { }
398 5 17 if $self->{'_in_do_block'} or $self->transaction_depth
405 12 5 if $timeout == -1
440 1 14 unless $parsed_error->is_transient
443 0 14 if $self->warn_on_retryable_error
446 1 13 if ($sleep_time == -1) { }
4 9 elsif ($sleep_time) { }
449 0 13 if ($new_timeout > 0)
457 4 9 unless ($parsed_error->error_type eq 'lock')
465 0 13 if (my $connect_error = $@)
475 2 7 unless $self->enable_retryable
497 0 1 unless $self->enable_retryable
524 0 17 if ($needs_resetting)
553 0 2 if ($self->_failed_attempt_count <= 1)
574 2 17 if $exception_prefix
576 17 2 unless $exception_prefix
580 2 0 if (&blessed($error) and $error->isa('DBIx::Class::Exception')) { }