Author: stas Date: Thu Apr 28 10:50:38 2005 New Revision: 165170 URL: http://svn.apache.org/viewcvs?rev=165170&view=rev Log: fix the test to use the right error checking
Modified: perl/modperl/trunk/t/protocol/TestProtocol/echo_timeout.pm perl/modperl/trunk/t/response/TestError/runtime.pm Modified: perl/modperl/trunk/t/protocol/TestProtocol/echo_timeout.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/protocol/TestProtocol/echo_timeout.pm?rev=165170&r1=165169&r2=165170&view=diff ============================================================================== --- perl/modperl/trunk/t/protocol/TestProtocol/echo_timeout.pm (original) +++ perl/modperl/trunk/t/protocol/TestProtocol/echo_timeout.pm Thu Apr 28 10:50:38 2005 @@ -10,9 +10,10 @@ use Apache2::Connection (); use APR::Socket (); +use APR::Status (); use Apache2::Const -compile => 'OK'; -use APR::Const -compile => qw(TIMEUP SO_NONBLOCK); +use APR::Const -compile => qw(SO_NONBLOCK); use constant BUFF_LEN => 1024; @@ -32,7 +33,7 @@ my $buff; my $rlen = eval { $socket->recv($buff, BUFF_LEN) }; if ($@) { - die "timed out, giving up: $@" if $@ == APR::Const::TIMEUP; + die "timed out, giving up: $@" if APR::Status::is_EAGAIN($@); die $@; } @@ -40,7 +41,7 @@ my $wlen = eval { $socket->send($buff) }; if ($@) { - die "timed out, giving up: $@" if $@ == APR::Const::TIMEUP; + die "timed out, giving up: $@" if APR::Status::is_EAGAIN($@); die $@; } } Modified: perl/modperl/trunk/t/response/TestError/runtime.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestError/runtime.pm?rev=165170&r1=165169&r2=165170&view=diff ============================================================================== --- perl/modperl/trunk/t/response/TestError/runtime.pm (original) +++ perl/modperl/trunk/t/response/TestError/runtime.pm Thu Apr 28 10:50:38 2005 @@ -7,12 +7,12 @@ use Apache2::RequestIO (); use Apache2::Connection (); use APR::Socket (); +use APR::Status (); use Apache::TestUtil; use Apache2::Const -compile => qw(OK); -use APR::Const -compile => qw(EACCES EAGAIN); -use APR::Status (); +use APR::Const -compile => qw(EACCES); use constant SIZE => 2048; @@ -43,7 +43,7 @@ die "the exception should have been an APR::Error object" unless ref $@ eq 'APR::Error'; - # == && != (expecting APR::Const::EAGAIN error) + # == && != (expecting an EAGAIN error) die "APR::Status is broken" unless APR::Status::is_EAGAIN($@); die "'==' overload is broken" unless $@ == $@; die "'!=' overload is broken" unless $@ != APR::Const::EACCES;