Navigation Menu

Skip to content

Commit

Permalink
better address for timeout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 25, 2012
1 parent 0f2743b commit 3573232
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/mojo/user_agent_online.t
Expand Up @@ -332,13 +332,13 @@ is $tx3->res->code, 200, 'right status';
is $tx4->res->code, 200, 'right status';
like $tx2->res->content->asset->slurp, qr/Perl/i, 'right content';

# Connect timeout (non-routable IP)
$tx = $ua->connect_timeout('0.5')->get('10.255.255.1');
# Connect timeout (non-routable address)
$tx = $ua->connect_timeout('0.5')->get('192.0.2.1');
ok !$tx->is_finished, 'transaction is not finished';
is $tx->error, 'Connect timeout.', 'right error';
$ua->connect_timeout(3);

# Request timeout (non-routable IP)
$tx = $ua->request_timeout('0.5')->get('10.255.255.1');
# Request timeout (non-routable address)
$tx = $ua->request_timeout('0.5')->get('192.0.2.1');
ok !$tx->is_finished, 'transaction is not finished';
is $tx->error, 'Request timeout.', 'right error';

0 comments on commit 3573232

Please sign in to comment.