view t/maxconns.t @ 1:7ba3a424d509

Added tag MEMCACHED_1_2_3 for changeset 30782bb1fc04
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 30 Sep 2007 03:50:28 +0400
parents 30782bb1fc04
children
line wrap: on
line source

#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 11;

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);
}