[PATCH 1/2] Add test for "flush_all 0".
Tomash Brechko
tomash.brechko at gmail.com
Thu Dec 6 12:43:15 UTC 2007
---
trunk/server/t/flush-all.t | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/trunk/server/t/flush-all.t b/trunk/server/t/flush-all.t
index 4f806c9..e113fc9 100755
--- a/trunk/server/t/flush-all.t
+++ b/trunk/server/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'");
--
1.5.3.6.961.gecf4
More information about the memcached
mailing list