Skip to content

Commit

Permalink
removed fragile test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 18, 2010
1 parent 206a1d4 commit 3a7bac3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions t/mojo/client.t
Expand Up @@ -12,7 +12,7 @@ use Test::More;
# Make sure sockets are working
plan skip_all => 'working sockets required for this test!'
unless Mojo::IOLoop->new->generate_port;
plan tests => 841;
plan tests => 41;

use_ok('Mojo::Client');

Expand All @@ -31,7 +31,7 @@ my $client = Mojo::Client->singleton->app(app);
my $port = $client->ioloop->generate_port;
my $buffer = {};
my $last;
$client->ioloop->listen(
my $id = $client->ioloop->listen(
port => $port,
accept_cb => sub {
my ($loop, $id) = @_;
Expand Down Expand Up @@ -165,12 +165,3 @@ $client->async->get(
)->process;
$client->async->ioloop->start;
is_deeply(\@kept_alive, [undef, 1, 1], 'connections kept alive');

# Stress test to make sure we don't leak file descriptors
for (1 .. 200) {
my $tx = Mojo::Client->new->app(app)->get('/');
is($tx->res->code, 200, 'right status');
is($tx->res->body, 'works', 'right content');
ok($tx->success, 'request successful');
is($tx->kept_alive, undef, 'connection not kept alive');
}

0 comments on commit 3a7bac3

Please sign in to comment.