Skip to content

Commit

Permalink
test max_clients too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 19, 2015
1 parent 45f1584 commit b589b5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions t/mojo/daemon.t
Expand Up @@ -255,12 +255,14 @@ like $buffer, qr/Mojo$/, 'transactions were pipelined';

# Throttling
$daemon = Mojo::Server::Daemon->new(
app => $app,
listen => ['http://127.0.0.1'],
silent => 1
app => $app,
listen => ['http://127.0.0.1'],
max_clients => 23,
silent => 1
);
is scalar @{$daemon->acceptors}, 0, 'no active acceptors';
is scalar @{$daemon->start->acceptors}, 1, 'one active acceptor';
is $daemon->ioloop->max_connections, 23, 'right value';
$id = $daemon->acceptors->[0];
ok !!Mojo::IOLoop->acceptor($id), 'acceptor has been added';
is scalar @{$daemon->stop->acceptors}, 0, 'no active acceptors';
Expand Down

0 comments on commit b589b5b

Please sign in to comment.