diff options
author | Andrew Drake <andrew@frontapp.com> | 2019-05-30 16:37:56 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2019-08-27 16:55:44 -0700 |
commit | f2c0f096addc92f2c2528ea5ac29967e689dfed9 (patch) | |
tree | 812d3ebb5d81afcda540ae3c7157ce51aecbcf92 /t/watcher.t | |
parent | d4bed986e3dbb2402c47780020f27eb49c121084 (diff) | |
download | memcached-f2c0f096addc92f2c2528ea5ac29967e689dfed9.tar.gz |
Fix off-by-one in logger to allow CAS commands to be logged.
Diffstat (limited to 't/watcher.t')
-rw-r--r-- | t/watcher.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/watcher.t b/t/watcher.t index 76a963e..dc869e5 100644 --- a/t/watcher.t +++ b/t/watcher.t @@ -5,7 +5,7 @@ use strict; use warnings; use Socket qw/SO_RCVBUF/; -use Test::More tests => 10; +use Test::More tests => 12; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -103,3 +103,15 @@ if ($res eq "STORED\r\n") { is($found_log, 1, "found rawcmd log entry"); is($found_ev, 1, "found eviction log entry"); } + +# test cas command logs +{ + $watcher = $server->new_sock; + print $watcher "watch mutations\n"; + $res = <$watcher>; + is($res, "OK\r\n", "mutations watcher enabled"); + + print $client "cas cas_watch_key 0 0 5 0\r\nvalue\r\n"; + my $log = <$watcher>; + like($log, qr/cmd=cas/, "correctly logged cas command"); +} |