"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/t/issue_61.t" (21 Feb 2022, 791 Bytes) of package /linux/www/memcached-1.6.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl
    2 
    3 use strict;
    4 use Test::More tests => 7;
    5 use FindBin qw($Bin);
    6 use lib "$Bin/lib";
    7 use MemcachedTest;
    8 
    9 my $server = new_memcached("-R 1");
   10 my $sock = $server->sock;
   11 
   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 cmp_ok ($stats->{"conn_yields"}, ">=", "5", "Got a decent number of yields");