make note about deadlock when moving position of timer execution
[scpubgit/Object-Remote.git] / t / chained.t
CommitLineData
d3944ab9 1use strictures 1;
2use Test::More;
3
abef6e5b 4$ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
5
d3944ab9 6use Object::Remote;
7use Object::Remote::FromData;
8
9my $conn1 = Reconnector->new::on('-');
10my $conn2 = $conn1->connect;
11
12isa_ok($conn1, 'Object::Remote::Proxy');
13isa_ok($conn2, 'Object::Remote::Proxy');
14
15my $root_pid = $$;
16my $conn1_pid = $conn1->pid;
17my $conn2_pid = $conn2->pid;
18
19ok($root_pid != $conn1_pid, "Root and conn1 are not the same interpreter instance");
20ok($root_pid != $conn2_pid, "Root and conn2 are not the same interpreter instance");
21ok($conn1_pid != $conn2_pid, "conn1 and conn2 are not the same interpreter instance");
22
23ok($conn1->ping eq "pong", "Ping success on conn1");
24ok($conn2->ping eq "pong", "Ping success on conn2");
25
26done_testing;
27
28__DATA__
29
30package Reconnector;
31
32use Moo;
33
34sub connect {
35 return Reconnector->new::on('-');
36}
37
38sub pid {
39 return $$;
40}
41
42sub ping {
43 return 'pong';
abef6e5b 44}