Branch Coverage

lib/Kafka/Consumer.pm
Criterion Covered Total %
branch 37 66 56.0


line true false branch
270 20 159 unless &_INSTANCE($self->{'Connection'}, 'Kafka::Connection')
272 8 151 unless $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'}) and not utf8::is_utf8($self->{'ClientId'})
274 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
276 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
278 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
280 15 95 unless defined &_POSINT($self->{'MaxNumberOfOffsets'}) and $self->{'MaxNumberOfOffsets'} <= $Kafka::Consumer::MAX_INT32
335 8 5047 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
337 10 5037 unless defined $partition and &isint($partition) and $partition >= 0
339 13 5024 unless defined $start_offset and _isbig($start_offset) && $start_offset >= 0 || defined &_NONNEGINT($start_offset)
341 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
371 0 5009 unless $received_topic->{'TopicName'} eq $topic
374 0 5009 unless $received_partition->{'Partition'} == $partition
379 15018 0 if ($Kafka::Consumer::BITS64) { }
387 0 15018 if $offset < $start_offset and not $_return_all
400 0 15018 if $attributes & 240
402 0 15018 if (my $compression_codec = $attributes & 7)
403 0 0 unless ($compression_codec == 1 or $compression_codec == 2)
474 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
520 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
621 11 52 unless defined $time and _isbig($time) || &isint($time) and $time >= $Kafka::Consumer::RECEIVE_EARLIEST_OFFSET
623 14 36 unless not defined $max_number or &_POSINT($max_number) and $max_number <= $Kafka::Consumer::MAX_INT32
632 8 30 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
634 10 20 unless defined $partition and &isint($partition) and $partition >= 0
664 0 18 if ($is_v1) { }
723 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
725 0 0 unless defined $partition and &isint($partition) and $partition >= 0
727 0 0 unless defined $offset and _isbig($offset) && $offset >= 0 || defined &_NONNEGINT($offset)
729 0 0 unless defined $group and $group eq '' || defined &_STRING($group) and not utf8::is_utf8($group)
787 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
789 0 0 unless defined $partition and &isint($partition) and $partition >= 0
791 0 0 unless defined $group and $group eq '' || defined &_STRING($group) and not utf8::is_utf8($group)