remove t/logsetup.pl and move feature into $ENV{OBJECT_REMOTE_TEST_LOGGER}; set to...
[scpubgit/Object-Remote.git] / t / timeout.t
1 use strictures 1;
2 use Test::More;
3
4 $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
5
6 use Object::Remote;
7 use Object::Remote::Connector::Local;
8
9 my $connector = Object::Remote::Connector::Local->new(
10   timeout => 0.1,
11   perl_command => [ 'perl', '-e', 'sleep 3' ],
12 );
13
14 ok(!eval { $connector->connect; 1 }, 'Connection failed');
15
16 like($@, qr{timed out}, 'Connection failed with time out');
17
18 done_testing;