Navigation Menu

Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 27, 2010
1 parent 0bf6762 commit 5f44807
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions t/mojo/client.t
Expand Up @@ -113,21 +113,21 @@ is $tx->error, 'Interrupted, maybe a timeout?', 'right error';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->keep_alive, 0, 'keep connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works too!', 'no content';
is $tx->res->body, 'works too!', 'right content';

# GET / (mock server)
$tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# GET / (mock server again)
$tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, 1, 'kept connection alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# Close connection (bypassing safety net)
$client->ioloop->_drop_immediately($last);
Expand All @@ -137,14 +137,14 @@ $tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# GET / (mock server again)
$tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, 1, 'kept connection alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# Close connection (bypassing safety net)
$client->ioloop->_drop_immediately($last);
Expand All @@ -154,14 +154,14 @@ $tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# GET / (mock server again)
$tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, 1, 'kept connection alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# Taint connection (on UNIX)
$^O eq 'MSWin32'
Expand All @@ -173,14 +173,14 @@ $tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# GET / (mock server again)
$tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, 1, 'kept connection alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# Taint connection (on UNIX)
$^O eq 'MSWin32'
Expand All @@ -192,7 +192,7 @@ $tx = $client->get("http://localhost:$port/mock");
ok $tx->success, 'successful';
is $tx->kept_alive, undef, 'kept connection not alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'no content';
is $tx->res->body, 'works!', 'right content';

# Nested keep alive
my @kept_alive;
Expand Down

0 comments on commit 5f44807

Please sign in to comment.