Skip to content

Commit

Permalink
Make t/05_reconnect_timeout skip without memcached
Browse files Browse the repository at this point in the history
(Ulrich Habel)

git-svn-id: http://code.sixapart.com/svn/memcached/trunk/api/perl@841 b0b603af-a30f-0410-a34e-baf09ae79d0b
  • Loading branch information
dormando committed Jun 18, 2010
1 parent c3958ea commit 1602877
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions t/05_reconnect_timeout.t
Expand Up @@ -6,9 +6,15 @@ use Cache::Memcached;
use IO::Socket::INET;
use Time::HiRes;

my $testaddr = "192.0.2.1:11211";

plan tests => 2;
my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(PeerAddr => $testaddr,
Timeout => 3);
if ($msock) {
plan tests => 2;
} else {
plan skip_all => "No memcached instance running at $testaddr\n";
exit 0;
}

my $memd = Cache::Memcached->new({
servers => [ $testaddr ],
Expand Down

0 comments on commit 1602877

Please sign in to comment.