Branch Coverage

blib/lib/Test/RedisServer.pm
Criterion Covered Total %
branch 23 46 50.0


line true false branch
47 12 0 unless (defined $self->conf->{'port'} or defined $self->conf->{'unixsocket'})
52 12 0 unless (defined $self->conf->{'dir'})
56 0 12 if ($self->conf->{'loglevel'} and $self->conf->{'loglevel'} eq "warning")
61 12 0 if ($self->auto_start)
68 0 12 if defined $self->pid and $$ == $self->_owner_pid
74 0 12 if defined $self->pid
77 0 12 unless open my $logfh, ">>", "$tmpdir/redis-server.log"
81 0 12 unless defined $pid
83 6 6 if ($pid == 0)
84 0 6 unless open STDOUT, ">&", $logfh
85 0 6 unless open STDERR, ">&", $logfh
95 6 12 if (waitpid($pid, 1) > 0) { }
101 12 0 if (open $logfh, "<", "$tmpdir/redis-server.log")
109 0 12 if ($log =~ /[Rr]eady to accept connections/)
118 6 0 unless ($ready)
119 0 6 if ($self->pid)
128 6 0 if (open $logfh, "<", "$tmpdir/redis-server.log")
144 0 6 unless open my $conffh, ">", "$tmpdir/redis.conf"
149 6 0 unless (CORE::exec "redis-server", "$tmpdir/redis.conf")
150 6 0 if ($! == 2) { }
164 0 0 unless defined $self->pid
197 0 0 if ($port and $port > 0) { }
215 0 18 unless defined $v