diff options
author | Tomash Brechko <tomash.brechko@gmail.com> | 2007-12-08 04:16:01 +0000 |
---|---|---|
committer | Tomash Brechko <tomash.brechko@gmail.com> | 2007-12-08 04:16:01 +0000 |
commit | 3e81447c483be8f4baa75c2c39d38f06971e36ac (patch) | |
tree | cc920fa8e39291ff1d19f2129817a55a269c84e3 /t/flush-all.t | |
parent | d605690a365938167c843585423532ade977b96f (diff) | |
download | memcached-3e81447c483be8f4baa75c2c39d38f06971e36ac.tar.gz |
Add test for "flush_all 0" (Tomash Brechko)
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@666 b0b603af-a30f-0410-a34e-baf09ae79d0b
Diffstat (limited to 't/flush-all.t')
-rwxr-xr-x | t/flush-all.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/flush-all.t b/t/flush-all.t index 4f806c9..e113fc9 100755 --- a/t/flush-all.t +++ b/t/flush-all.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 10; +use Test::More tests => 14; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -18,6 +18,15 @@ print $sock "flush_all\r\n"; is(scalar <$sock>, "OK\r\n", "did flush_all"); mem_get_is($sock, "foo", undef); +# Test flush_all with zero delay. +print $sock "set foo 0 0 6\r\nfooval\r\n"; +is(scalar <$sock>, "STORED\r\n", "stored foo"); + +mem_get_is($sock, "foo", "fooval"); +print $sock "flush_all 0\r\n"; +is(scalar <$sock>, "OK\r\n", "did flush_all"); +mem_get_is($sock, "foo", undef); + # check that flush_all doesn't blow away items that immediately get set print $sock "set foo 0 0 3\r\nnew\r\n"; is(scalar <$sock>, "STORED\r\n", "stored foo = 'new'"); |