Skip to content

Commit

Permalink
test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 2, 2011
1 parent 4c1970c commit 98183b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions t/mojolicious/longpolling_lite_app.t
Expand Up @@ -44,7 +44,7 @@ get '/longpoll' => sub {
$self->res->code(200);
$self->res->headers->content_type('text/plain');
$self->write_chunk('hi ');
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub {
$self->write_chunk('there,',
sub { shift->write_chunk(' whats up?'); });
Expand Down Expand Up @@ -75,7 +75,7 @@ get '/longpoll/plain' => sub {
$self->res->headers->content_type('text/plain');
$self->res->headers->content_length(25);
$self->write('hi ');
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub {
$self->on_finish(sub { $longpoll_plain = 'finished!' });
$self->write('there plain,', sub { shift->write(' whats up?') });
Expand All @@ -91,7 +91,7 @@ get '/longpoll/delayed' => sub {
$self->res->code(200);
$self->res->headers->content_type('text/plain');
$self->write_chunk;
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub {
$self->write_chunk(
sub {
Expand All @@ -114,7 +114,7 @@ get '/longpoll/plain/delayed' => sub {
$self->res->headers->content_type('text/plain');
$self->res->headers->content_length(12);
$self->write;
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub {
$self->write(
sub {
Expand All @@ -132,7 +132,7 @@ my $longpoll_static_delayed;
get '/longpoll/static/delayed' => sub {
my $self = shift;
$self->on_finish(sub { $longpoll_static_delayed = 'finished!' });
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub { $self->render_static('hello.txt') });
};

Expand All @@ -142,7 +142,7 @@ get '/longpoll/static/delayed_too' => sub {
my $self = shift;
$self->on_finish(sub { $longpoll_static_delayed_too = 'finished!' });
$self->render_later;
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'0.5' => sub { $self->render_static('hello.txt') });
} => 'delayed_too';

Expand All @@ -155,7 +155,7 @@ get '/too_long' => sub {
$self->res->headers->content_type('text/plain');
$self->res->headers->content_length(12);
$self->write('how');
$self->client->ioloop->timer(
$self->client->async->ioloop->timer(
'5' => sub {
$self->write(
sub {
Expand Down Expand Up @@ -199,7 +199,7 @@ is $longpoll, 'finished!', 'finished';
# GET /longpoll (interrupted)
$longpoll = undef;
my $port = $t->client->test_server;
$t->client->ioloop->connect(
$t->client->async->ioloop->connect(
address => 'localhost',
port => $port,
on_connect => sub {
Expand All @@ -212,7 +212,7 @@ $t->client->ioloop->connect(
$self->timer('0.5', sub { shift->stop });
}
);
$t->client->ioloop->start;
$t->client->async->ioloop->start;
is $longpoll, 'finished!', 'finished';

# GET /longpoll (also interrupted)
Expand Down

0 comments on commit 98183b5

Please sign in to comment.