diff options
author | Yuval Kogman <nothingmuch@woobling.org> | 2009-03-13 22:15:47 +0100 |
---|---|---|
committer | Yuval Kogman <nothingmuch@woobling.org> | 2009-03-13 22:15:47 +0100 |
commit | bfdc89b32ee2d58c585607e8a89a8a7fde3b9c95 (patch) | |
tree | b92819efeaade7a4114634d34fa23f327eba8430 | |
parent | various cleanups (diff) | |
parent | remove txn::memory, update test to check if memcachedb is running (diff) | |
download | kiokudb-backend-memcachedb-master.tar.gz |
Merge commit 'origin/master' master
Conflicts: lib/KiokuDB/Backend/Memcachedb.pm
-rw-r--r-- | lib/KiokuDB/Backend/Memcachedb.pm | 5 | ||||
-rw-r--r-- | xt/10_backend.t | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/KiokuDB/Backend/Memcachedb.pm b/lib/KiokuDB/Backend/Memcachedb.pm index 9d185ad..889d799 100644 --- a/lib/KiokuDB/Backend/Memcachedb.pm +++ b/lib/KiokuDB/Backend/Memcachedb.pm @@ -13,7 +13,6 @@ our $VERSION = "0.01"; with qw( KiokuDB::Backend KiokuDB::Backend::Serialize::Delegate - KiokuDB::Backend::Role::Clear ); sub BUILD { @@ -80,10 +79,6 @@ sub delete { $self->db->delete($_) foreach (@ids); } -sub clear { - shift->db->flush_all; -} - __PACKAGE__->meta->make_immutable; __PACKAGE__ diff --git a/xt/10_backend.t b/xt/10_backend.t index 7210a76..9184bcf 100644 --- a/xt/10_backend.t +++ b/xt/10_backend.t @@ -5,8 +5,18 @@ use Test::More; use Scope::Guard; BEGIN { - #plan skip_all => 'Please set KIOKU_COUCHDB_URI to a CouchDB instance URI' unless $ENV{KIOKU_COUCHDB_URI}; - plan 'no_plan'; + use IO::Socket::INET; + my $addr = shift || "127.0.0.1:21201"; + my $msock = IO::Socket::INET->new( + PeerAddr => $addr, + Timeout => 3 + ); + if ( $msock ) { + plan 'no_plan'; + } else { + plan skip_all => "No memcachedb instance running\n"; + exit 0; + } } use ok 'KiokuDB'; |