perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: svn commit: r428355 - in /perl/Apache-SizeLimit/trunk/t: apache/check_n_requests.t apache/check_n_requests2.t response/TestApache/check_n_requests.pm response/TestApache/check_n_requests2.pm
Date Sun, 06 Aug 2006 05:38:53 GMT
Torsten Foertsch wrote:
> On Thursday 03 August 2006 13:41, Philip M. Gollucci wrote:
>> Now,
>>   is there a way to programatically check the t/logs/error_log for the
>> existance / non existance of the A::SL child killed message ?  In the mean
>> time, this at least exercises the code that caused David Wheeler's error.
Thanks.  I've not heard anything from Stas, so I'm in favor of adding this to Apache-Test.
any reason you didn't use SEEK_CUR instead of 2 ?

Of course we'll then have to add need_Apache_Test 1.29+ for this test.

> 
> In one of my tests I use this:
> 
> {
>   my $f;
>   sub t_start_error_log_watch {
>     my $name=File::Spec->catfile( Apache::Test::vars->{t_logs}, 'error_log' );
>     open $f, "$name" or die "ERROR: Cannot open $name: $!\n";
>     seek $f, 0, 2;
>   }
> 
>   sub t_finish_error_log_watch {
>     local $/="\n";
>     my @lines=<$f>;
>     undef $f;
>     return @lines;
>   }
> }
> 
> then
> 
> t_start_error_log_watch;
> do_it;
> ok grep {...} t_finish_error_log_watch;
> 
> Torsten


-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message