Branch Coverage

lib/Beekeeper/Worker.pm
Criterion Covered Total %
branch 0 158 0.0


line true false branch
45 0 0 if $LogLevel >= 1
46 0 0 if $LogLevel >= 2
47 0 0 if $LogLevel >= 3
48 0 0 if $LogLevel >= 4
49 0 0 if $LogLevel >= 5
50 0 0 if $LogLevel >= 5
51 0 0 if $LogLevel >= 6
52 0 0 if $LogLevel >= 7
53 0 0 if $LogLevel >= 8
54 0 0 if $LogLevel >= 9
55 0 0 if scalar @_
109 0 0 if (defined $SIG{'TERM'} and $SIG{'TERM'} eq 'DEFAULT')
114 0 0 if (defined $SIG{'INT'} and $SIG{'INT'} eq 'DEFAULT' and $args{'foreground'})
128 0 0 if exists $self->{'_LOGGER'}{'_BUS'}
135 0 0 if ($@)
163 0 0 unless $auth_data and $auth_level
164 0 0 unless exists $AUTH_TOKENS{$auth_level}
165 0 0 unless $AUTH_TOKENS{$auth_level} eq $auth_data
174 0 0 if $self->{'_WORKER'}{'debug'} or $self->{'_WORKER'}{'config'}{'debug'}
269 0 0 unless $fq_meth =~ /^ ( [\w-]+ (?: \.[\w-]+ )* ) \. ( [\w-]+ | \* ) $/x
276 0 0 if exists $$callbacks{"msg.$fq_meth"}
292 0 0 unless ($worker->{'queued_tasks'})
299 0 0 unless $success
308 0 0 if (ref $callback eq 'CODE') { }
0 0 elsif (not ref $callback and $self->can($callback)) { }
338 0 0 unless $fq_meth =~ /^ ( [\w-]+ (?: \.[\w-]+ )* ) \. ( [\w-]+ | \* ) $/x
345 0 0 if exists $$callbacks{"req.$fq_meth"}
348 0 0 if $subscribed_to{$service}
351 0 0 if (keys %subscribed_to == 2)
369 0 0 unless ($worker->{'queued_tasks'})
376 0 0 unless $success
388 0 0 if $_TASK_QUEUE_DEPTH
393 0 0 unless (defined $BUSY_SINCE)
426 0 0 unless (ref $request eq 'HASH' and $request->{'jsonrpc'} eq '2.0')
436 0 0 unless (defined $method and $method =~ /^([\.\w-]+)\.([\w-]+)$/)
448 0 0 unless (($self->authorize_request($request) || '') eq 78775689)
453 0 0 unless ($cb)
461 0 0 if ($@)
468 0 0 if ($task = shift @{$$worker{'task_queue_low'};})
481 0 0 unless (ref $request eq 'HASH' and $request->{'jsonrpc'} eq '2.0')
492 0 0 unless (defined $method and $method =~ /^([\.\w-]+)\.([\w-]+)$/)
504 0 0 unless (($self->authorize_request($request) || '') eq 78775689)
509 0 0 unless ($cb)
518 0 0 if ($@) { }
0 0 elsif (&blessed($result) and $result->isa('Beekeeper::JSONRPC::Error')) { }
0 0 elsif ($request->{'_async_response'}) { }
520 0 0 if (&blessed($@) and $@->isa('Beekeeper::JSONRPC::Error')) { }
531 0 0 if $worker->{'debug'}
553 0 0 if (defined $request_id and defined $response) { }
561 0 0 if ($@)
581 0 0 if (exists $mqtt_properties->{'packet_id'}) { }
606 0 0 if @{$worker->{'task_queue_high'};} or @{$worker->{'task_queue_low'};}
609 0 0 if (exists $worker->{'postponed'})
617 0 0 if (defined $timing_tasks)
635 0 0 unless defined $request->{'id'}
637 0 0 unless (defined $BUSY_SINCE)
642 0 0 if (&blessed($result) and $result->isa('Beekeeper::JSONRPC::Error')) { }
660 0 0 if ($@)
675 0 0 if (defined $timing_tasks)
688 0 0 unless @methods
692 0 0 unless $fq_meth =~ /^ ( [\w-]+ (?: \.[\w-]+ )* ) \. ( [\w-]+ | \* ) $/x
699 0 0 unless (defined $worker->{'callbacks'}{"msg.$fq_meth"})
729 0 0 unless $success
747 0 0 unless @methods
751 0 0 unless $fq_meth =~ /^ ( [\w-]+ (?: \.[\w-]+ )* ) \. ( [\w-]+ | \* ) $/x
756 0 0 unless ($method eq '*')
769 0 0 unless (@cb_keys)
794 0 0 unless $worker->{'shutting_down'}
796 0 0 if ($worker->{'in_progress'} > 0)
806 0 0 unless ($worker->{'in_progress'} > 0 and --$wait_time > 0)
824 0 0 unless $success
855 0 0 if ($@)
860 0 0 if ($self->{'_BUS'}{'is_connected'})
873 0 0 if $worker->{'shutting_down'}
876 0 0 unless (defined $worker->{'stop_cv'})
883 0 0 unless $fq_meth =~ /^req\.(?!_sync)(.*)\./
887 0 0 if (keys %services) { }
933 0 0 unless $queue =~ /^req\.(?!_sync)(.*)\./
960 0 0 unless $self->{'_BUS'}{'is_connected'}