--- AnyEvent/t/65_event_09_multi.t 2011/08/12 00:53:29 1.3 +++ AnyEvent/t/65_event_09_multi.t 2011/10/01 22:39:29 1.8 @@ -14,15 +14,22 @@ } } +$^W = 0; # 5.8.6 bugs + use AnyEvent; use AnyEvent::Util; -BEGIN { eval q{use AnyEvent::Impl::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not loadable -}), exit 0) } + + BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } + BEGIN { eval q{use AnyEvent::Impl::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not loadable\n}), exit 0) } + + $| = 1; print "1..15\n"; print "ok 1\n"; +$AnyEvent::MAX_SIGNAL_LATENCY = 0.05; + my ($a, $b) = AnyEvent::Util::portable_socketpair; # I/O write @@ -42,7 +49,7 @@ # I/O read { my $cv = AE::cv; - my $wt = AE::timer 0.1, 0, $cv; + my $wt = AE::timer 0.01, 0, $cv; my $s = 0; my $wa = AE::io $a, 0, sub { $cv->end; $s |= 1 }; @@ -67,7 +74,7 @@ sysread $a, my $dummy, 1; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 0.01, 0, $cv; $s = 0; $cv->recv; @@ -78,7 +85,7 @@ # signal { my $cv = AE::cv; - my $wt = AE::timer 0.1, 0, $cv; + my $wt = AE::timer 0.01, 0, $cv; my $s = 0; $cv->begin; my $wa = AE::signal INT => sub { $cv->end; $s |= 1 }; @@ -91,7 +98,7 @@ kill INT => $$; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 0.2, 0, $cv; # maybe OS X needs more time here? $s = 0; $cv->recv; @@ -99,7 +106,7 @@ print $s == 3 ? "" : "not ", "ok 7 # $s\n"; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 0.01, 0, $cv; $s = 0; $cv->recv; @@ -107,12 +114,10 @@ print $s == 0 ? "" : "not ", "ok 8 # $s\n"; } -$AnyEvent::MAX_SIGNAL_LATENCY = 0.2; - # child { my $cv = AE::cv; - my $wt = AE::timer 0.1, 0, $cv; + my $wt = AE::timer 0.01, 0, $cv; my $s = 0; my $pid = fork; @@ -134,7 +139,7 @@ kill 9, $pid; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 0.2, 0, $cv; # cygwin needs ages for this $s = 0; $cv->recv; @@ -144,7 +149,7 @@ print $astatus == 9 && $bstatus == 9 ? "" : "not ", "ok 12 # $astatus == $bstatus == 9\n"; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 0.01, 0, $cv; $s = 0; $cv->recv;