~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to plugin/innodb_memcached/daemon_memcached/t/issue_108.t

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
use Test::More tests => 4;
 
5
use FindBin qw($Bin);
 
6
use lib "$Bin/lib";
 
7
use MemcachedTest;
 
8
 
 
9
my $server = new_memcached();
 
10
my $sock = $server->sock;
 
11
my $key = "del_key";
 
12
 
 
13
print $sock "add $key 0 0 1\r\nx\r\n";
 
14
is (scalar <$sock>, "STORED\r\n", "Added a key");
 
15
 
 
16
print $sock "delete $key 0\r\n";
 
17
is (scalar <$sock>, "DELETED\r\n", "Properly deleted with 0");
 
18
 
 
19
print $sock "add $key 0 0 1\r\nx\r\n";
 
20
is (scalar <$sock>, "STORED\r\n", "Added again a key");
 
21
 
 
22
print $sock "delete $key 0 noreply\r\n";
 
23
# will not reply, but a subsequent add will succeed
 
24
 
 
25
print $sock "add $key 0 0 1\r\nx\r\n";
 
26
is (scalar <$sock>, "STORED\r\n", "Add succeeded after quiet deletion.");
 
27