Branch Coverage

blib/lib/ElasticSearch/Transport.pm
Criterion Covered Total %
branch 0 118 0.0


line true false branch
36 0 0 unless my $transport_class = $Transport{$transport_name}
43 0 0 unless eval "require $transport_class"
44 0 0 if (my $min = $Min_Versions{$transport_class})
46 0 0 unless $version ge $min
63 0 0 ref $servers eq 'ARRAY' ? :
67 0 0 unless exists $$params{$_}
91 0 0 unless $single_server
93 0 0 unless $self->send_request($srvr, $args)
0 0 if $json = eval { do { '{"ok":true}' unless $self->send_request($srvr, $args) } }
97 0 0 if not $single_server and $self->should_retry($srvr, $error)
98 0 0 unless $error = $self->_handle_error($srvr, $params, $error)
118 0 0 unless $as_json and not $post_process and $skip_log
121 0 0 unless $skip_log
124 0 0 if ($post_process)
126 0 0 if ($as_json)
132 0 0 $as_json ? :
141 0 0 unless $as_json
152 0 0 unless $error->isa('ElasticSearch::Error::Connection')
157 0 0 if ($self->no_refresh or $error->isa('ElasticSearch::Error::NotReady')) { }
176 0 0 unless ref $error
180 0 0 if $error->isa('ElasticSearch::Error::Missing') and $$params{'qs'}{'ignore_missing'}
185 0 0 if (my $raw = $$error{-'vars'}{'content'})
186 0 0 if $error->isa('ElasticSearch::Error::Conflict') and $raw =~ /: version conflict, current \[(\d+)\]/
192 0 0 if (ref $content and $$content{'error'})
194 0 0 if $$content{'error_trace'}
213 0 0 ref $data eq 'SCALAR' ? :
0 0 if $data
237 0 0 unless $server
239 0 0 unless my $nodes = eval { do { $self->request({'cmd', '/_cluster/nodes', 'qs', {'http', 1}}, $server) } }
246 0 0 unless $$_{$protocol . '_address'} or $$_{$protocol . 'Address'}
252 0 0 unless @servers
254 0 0 if ($protocol eq 'http')
278 0 0 unless ($$self{'_refresh_in'}--)
279 0 0 if ($self->no_refresh) { }
291 0 0 unless (@servers)
294 0 0 unless (@servers)
340 0 0 if (@_)
341 0 0 ref $_[0] eq 'ARRAY' ? :
350 0 0 if (@_)
360 0 0 if (@_)
371 0 0 unless $length > $self->max_content_length
391 0 0 unless defined $cmd
393 0 0 if $_[0]
406 0 0 unless IO::Uncompress::Inflate::inflate(\$content, \$output, 'Transparent', 0)
416 0 0 if (@_)
427 0 0 if (@_)
438 0 0 if (@_)
448 0 0 if (@_)
461 0 0 unless (exists $$self{'_log_fh'}{$$})
463 0 0 if (my $file = $self->trace_calls)
464 0 0 if $file eq 1
466 0 0 if (openhandle $file) { }
472 0 0 unless open $log_fh, $open_mode, $file
487 0 0 unless my $log = $self->_log_fh
492 0 0 if (defined $data and $data ne "{}\n") { }
516 0 0 unless my $log = $self->_log_fh
518 0 0 ref $content ? :
523 0 0 if (length $line > 65)
525 0 0 if length $spaces > 20