ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/69_ev_09_multi.t
(Generate patch)

Comparing AnyEvent/t/69_ev_09_multi.t (file contents):
Revision 1.4 by root, Fri Aug 12 18:41:30 2011 UTC vs.
Revision 1.10 by root, Tue Jul 30 23:14:34 2013 UTC

12 exit 0; 12 exit 0;
13 } 13 }
14 } 14 }
15} 15}
16 16
17$^W = 0; # 5.8.6 bugs
18
17use AnyEvent; 19use AnyEvent;
18use AnyEvent::Util; 20use AnyEvent::Util;
19 21
22 BEGIN { $^W = 0 }
20 BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } 23 BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) }
21 BEGIN { eval q{use AnyEvent::Impl::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV not loadable\n}), exit 0) } 24 BEGIN { eval q{use AnyEvent::Impl::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV not loadable\n}), exit 0) }
22 25
23 26
24 27
25$| = 1; print "1..15\n"; 28$| = 1; print "1..15\n";
26 29
27print "ok 1\n"; 30print "ok 1\n";
31
32$AnyEvent::MAX_SIGNAL_LATENCY = 0.05;
28 33
29my ($a, $b) = AnyEvent::Util::portable_socketpair; 34my ($a, $b) = AnyEvent::Util::portable_socketpair;
30 35
31# I/O write 36# I/O write
32{ 37{
92 print $s == 0 ? "" : "not ", "ok 6 # $s\n"; 97 print $s == 0 ? "" : "not ", "ok 6 # $s\n";
93 98
94 kill INT => $$; 99 kill INT => $$;
95 100
96 $cv = AE::cv; 101 $cv = AE::cv;
97 $wt = AE::timer 0.01, 0, $cv; 102 $wt = AE::timer 0.2, 0, $cv; # maybe OS X needs more time here? or maybe some buggy arm kernel?
98 103
99 $s = 0; 104 $s = 0;
100 $cv->recv; 105 $cv->recv;
101 106
102 print $s == 3 ? "" : "not ", "ok 7 # $s\n"; 107 print $s == 3 ? "" : "not ", "ok 7 # $s\n";
107 $s = 0; 112 $s = 0;
108 $cv->recv; 113 $cv->recv;
109 114
110 print $s == 0 ? "" : "not ", "ok 8 # $s\n"; 115 print $s == 0 ? "" : "not ", "ok 8 # $s\n";
111} 116}
112
113$AnyEvent::MAX_SIGNAL_LATENCY = 0.2;
114 117
115# child 118# child
116{ 119{
117 my $cv = AE::cv; 120 my $cv = AE::cv;
118 my $wt = AE::timer 0.01, 0, $cv; 121 my $wt = AE::timer 0.01, 0, $cv;
135 print $s == 0 ? "" : "not ", "ok 9 # $s\n"; 138 print $s == 0 ? "" : "not ", "ok 9 # $s\n";
136 139
137 kill 9, $pid; 140 kill 9, $pid;
138 141
139 $cv = AE::cv; 142 $cv = AE::cv;
140 $wt = AE::timer 0.01, 0, $cv; 143 $wt = AE::timer 0.2, 0, $cv; # cygwin needs ages for this
141 144
142 $s = 0; 145 $s = 0;
143 $cv->recv; 146 $cv->recv;
144 147
145 print $s == 3 ? "" : "not ", "ok 10 # $s\n"; 148 print $s == 3 ? "" : "not ", "ok 10 # $s\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines