Branch Coverage

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


line true false branch
269 20 159 unless &_INSTANCE($self->{'Connection'}, 'Kafka::Connection')
271 8 151 unless $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'}) and not utf8::is_utf8($self->{'ClientId'})
273 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
275 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
277 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
279 15 95 unless defined &_POSINT($self->{'MaxNumberOfOffsets'}) and $self->{'MaxNumberOfOffsets'} <= $Kafka::Consumer::MAX_INT32
334 8 5047 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
336 10 5037 unless defined $partition and &isint($partition) and $partition >= 0
338 13 5024 unless defined $start_offset and _isbig($start_offset) && $start_offset >= 0 || defined &_NONNEGINT($start_offset)
340 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
370 0 5009 unless $received_topic->{'TopicName'} eq $topic
373 0 5009 unless $received_partition->{'Partition'} == $partition
378 15018 0 if ($Kafka::Consumer::BITS64) { }
386 0 15018 if $offset < $start_offset and not $_return_all
399 0 15018 if $attributes & 240
401 0 15018 if (my $compression_codec = $attributes & 7)
402 0 0 unless ($compression_codec == 1 or $compression_codec == 2)
473 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
519 0 0 unless defined $time and _isbig($time) || &isint($time) and $time >= 0
620 11 52 unless defined $time and _isbig($time) || &isint($time) and $time >= $Kafka::Consumer::RECEIVE_EARLIEST_OFFSET
622 14 36 unless not defined $max_number or &_POSINT($max_number) and $max_number <= $Kafka::Consumer::MAX_INT32
631 8 30 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
633 10 20 unless defined $partition and &isint($partition) and $partition >= 0
663 0 18 if ($is_v1) { }
722 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
724 0 0 unless defined $partition and &isint($partition) and $partition >= 0
726 0 0 unless defined $offset and _isbig($offset) && $offset >= 0 || defined &_NONNEGINT($offset)
728 0 0 unless defined $group and $group eq '' || defined &_STRING($group) and not utf8::is_utf8($group)
786 0 0 unless defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
788 0 0 unless defined $partition and &isint($partition) and $partition >= 0
790 0 0 unless defined $group and $group eq '' || defined &_STRING($group) and not utf8::is_utf8($group)