#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 10;

use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;


# start up a server with 10 maximum connections
my $server = new_memcached('-c 10');
my $sock = $server->sock;
my @sockets;

ok(defined($sock), 'Connection 0');
push (@sockets, $sock);

foreach my $conn (1..20) {
  $sock = $server->new_sock;
  if ($conn > 10) {
    ok(!defined($sock), "Failed Connection $conn $sock");
  } else {
    ok(defined($sock), "Connection $conn");
    push(@sockets, $sock);
  }    
}

mem_stats($sock, '');
sleep(100);

#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 21;

use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;


# start up a server with 10 maximum connections
my $server = new_memcached('-c 10');
my $sock = $server->sock;
my @sockets;

ok(defined($sock), 'Connection 0');
push (@sockets, $sock);


foreach my $conn (1..10) {
  $sock = $server->new_sock;
  ok(defined($sock), "Made connection $conn");
  push(@sockets, $sock);
}

TODO: {
local $TODO = "Need to decide on what -c semantics are";

foreach my $conn (11..20) {
  $sock = $server->new_sock;
  ok(defined($sock), "Connection $conn");
  push(@sockets, $sock);
}
}

Make this test pass for now, mark with TODO
Make this test pass for now, mark with TODO

git-svn-id: 6f10ac456e6b0f1f9ebd9754b1773582cb7e2e6b@475 b0b603af-a30f-0410-a34e-baf09ae79d0b
