4
use Test::More tests => 7;
9
my $server = new_memcached("-R 1");
10
my $sock = $server->sock;
12
print $sock "set foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\n";
13
is (scalar <$sock>, "STORED\r\n", "stored foobar");
14
is (scalar <$sock>, "STORED\r\n", "stored foobar");
15
is (scalar <$sock>, "STORED\r\n", "stored foobar");
16
is (scalar <$sock>, "STORED\r\n", "stored foobar");
17
is (scalar <$sock>, "STORED\r\n", "stored foobar");
18
is (scalar <$sock>, "STORED\r\n", "stored foobar");
19
my $stats = mem_stats($sock);
20
is ($stats->{"conn_yields"}, "5", "Got a decent number of yields");