Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove unused parameter to item_size_ok()
* Use a single printf() in usage() * Add a failing test for conforming with maximum connections. git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@473 b0b603af-a30f-0410-a34e-baf09ae79d0b
- Loading branch information
Showing
6 changed files
with
76 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/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); |