Branch Coverage

lib/Kafka/Consumer.pm
Criterion Covered Total %
branch 44 82 53.6


line true false branch
267 594 0 if (exists $self->{$p}) { }
278 20 159 unless &_INSTANCE($self->{'Connection'}, 'Kafka::Connection')
280 7 152 unless $self->{'ClientId'} eq '' or defined &_STRING($self->{'ClientId'})
282 1 151 if utf8::is_utf8($self->{'ClientId'})
284 2 139 unless defined $self->{'MaxWaitTime'} and defined &_NUMBER($self->{'MaxWaitTime'}) and int $self->{'MaxWaitTime'} * 1000 >= 1 and int $self->{'MaxWaitTime'} * 1000 <= $Kafka::Consumer::MAX_INT32
286 0 139 _isbig($self->{'MinBytes'}) ? :
13 126 unless _isbig($self->{'MinBytes'}) ? $self->{'MinBytes'} >= 0 : defined &_NONNEGINT($self->{'MinBytes'}) and $self->{'MinBytes'} <= $Kafka::Consumer::MAX_INT32
288 0 126 _isbig($self->{'MaxBytes'}) ? :
1 110 unless _isbig($self->{'MaxBytes'}) ? $self->{'MaxBytes'} > 0 : &_POSINT($self->{'MaxBytes'}) and $self->{'MaxBytes'} >= $Kafka::Consumer::MESSAGE_SIZE_OVERHEAD and $self->{'MaxBytes'} <= $Kafka::Consumer::MAX_INT32
290 15 95 unless defined &_POSINT($self->{'MaxNumberOfOffsets'}) and $self->{'MaxNumberOfOffsets'} <= $Kafka::Consumer::MAX_INT32
345 7 5048 unless defined $topic and $topic eq '' || defined &_STRING($topic)
347 1 5047 if utf8::is_utf8($topic)
349 10 5037 unless defined $partition and &isint($partition) and $partition >= 0
351 13 5024 unless defined $start_offset and _isbig($start_offset) && $start_offset >= 0 || defined &_NONNEGINT($start_offset)
353 1 5009 unless not defined $max_size or _isbig($max_size) || &_POSINT($max_size) and $max_size >= $Kafka::Consumer::MESSAGE_SIZE_OVERHEAD and $max_size <= $Kafka::Consumer::MAX_INT32
383 0 5009 unless $received_topic->{'TopicName'} eq $topic
386 0 5009 unless $received_partition->{'Partition'} == $partition
391 15018 0 if ($Kafka::Consumer::BITS64) { }
399 0 15018 if $offset < $start_offset and not $_return_all
412 0 15018 if $attributes & 240
414 0 15018 if (my $compression_codec = $attributes & 7)
415 0 0 unless ($compression_codec == 1 or $compression_codec == 2)
486 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
532 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
633 11 52 unless defined $time and _isbig($time) || &isint($time) and $time >= $Kafka::Consumer::RECEIVE_EARLIEST_OFFSET
635 14 36 unless not defined $max_number or &_POSINT($max_number) and $max_number <= $Kafka::Consumer::MAX_INT32
644 7 31 unless defined $topic and $topic eq '' || defined &_STRING($topic)
646 1 30 if utf8::is_utf8($topic)
648 10 20 unless defined $partition and &isint($partition) and $partition >= 0
678 0 18 if ($is_v1) { }
737 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic)
739 0 0 if utf8::is_utf8($topic)
741 0 0 unless defined $partition and &isint($partition) and $partition >= 0
743 0 0 unless defined $offset and _isbig($offset) && $offset >= 0 || defined &_NONNEGINT($offset)
745 0 0 unless defined $group and $group eq '' || defined &_STRING($group)
747 0 0 if utf8::is_utf8($group)
805 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic)
807 0 0 if utf8::is_utf8($topic)
809 0 0 unless defined $partition and &isint($partition) and $partition >= 0
811 0 0 unless defined $group and $group eq '' || defined &_STRING($group)
813 0 0 if utf8::is_utf8($group)