4 $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
6 use Object::Remote::Connection;
7 use Object::Remote::FromData;
9 $SIG{ALRM} = sub { fail("Watchdog killed remote process in time"); die "test failed" };
11 my $conn = Object::Remote->connect("-", watchdog_timeout => 1);
13 my $remote = HangClass->new::on($conn);
15 isa_ok($remote, 'Object::Remote::Proxy');
16 is($remote->alive, 1, "Hanging test object is running");
20 eval { $remote->hang };
22 like($@, qr/^Object::Remote connection lost: (?:eof|.*Broken pipe)/, "Correct error message");