Commit | Line | Data |
f129bfaf |
1 | use strictures 1; |
2 | use Test::More; |
3 | |
abef6e5b |
4 | $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1; |
f129bfaf |
5 | |
55c0d020 |
6 | use Object::Remote::Connector::Local; |
f129bfaf |
7 | |
8 | $SIG{ALRM} = sub { die "alarm signal\n" }; |
9 | |
8faf2a28 |
10 | my $fatnode_text = Object::Remote::Connector::Local->new(timeout => 1)->fatnode_text; |
f129bfaf |
11 | |
12 | #this simulates a node that has hung before it reaches |
13 | #the watchdog initialization - it's an edge case that |
14 | #could cause remote processes to not get cleaned up |
15 | #if it's not handled right |
16 | eval { |
17 | no warnings 'once'; |
55c0d020 |
18 | $Object::Remote::FatNode::INHIBIT_RUN_NODE = 1; |
f129bfaf |
19 | eval $fatnode_text; |
55c0d020 |
20 | |
f129bfaf |
21 | if ($@) { |
22 | die "could not eval fatnode text: $@"; |
55c0d020 |
23 | } |
24 | |
f129bfaf |
25 | while(1) { |
26 | sleep(1); |
27 | } |
28 | }; |
29 | |
30 | is($@, "alarm signal\n", "Alarm handler was invoked"); |
31 | |
55c0d020 |
32 | done_testing; |
f129bfaf |
33 | |