1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# DNS error.
use warnings;
use strict;
use lib 't';
use share;
@CheckPoint = (
{
normal => [
[ 'client', 0, IO::Stream::EDNS ], 'no such host',
],
misconfigured => [ # some systems are configured to resolve anything, just deal with it!
[ 'client', RESOLVED, undef ], 'resolve junk',
],
},
);
plan skip_all => 'Network connection';
IO::Stream->new({
host => 'no.such.host.q1w2e3',
port => 80,
cb => \&client,
wait_for => IN|EOF|OUT|SENT|CONNECTED|RESOLVED,
});
EV::loop;
sub client {
my ($io, $e, $err) = @_;
# &diag_event;
checkpoint($e, $err);
EV::unloop;
}
|