perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/hooks cleanup.t
Date Fri, 06 Jun 2003 04:24:11 GMT
stas        2003/06/05 21:24:11

  Modified:    t/hooks  cleanup.t
  Log:
  use nice constants instead of hardcoded numbers in the code (similar to
  cleanup2)
  
  Revision  Changes    Path
  1.3       +4 -1      modperl-2.0/t/hooks/cleanup.t
  
  Index: cleanup.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/cleanup.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cleanup.t	18 Apr 2003 06:18:57 -0000	1.2
  +++ cleanup.t	6 Jun 2003 04:24:11 -0000	1.3
  @@ -7,6 +7,9 @@
   
   use File::Spec::Functions qw(catfile catdir);
   
  +use constant SIZE  => 10;
  +use constant TRIES => 20;
  +
   my $vars = Apache::Test::config->{vars};
   my $dir  = catdir $vars->{documentroot}, "hooks";
   my $file = catfile $dir, "cleanup";
  @@ -30,7 +33,7 @@
       # and fill in the file. (wait 0.25 .. 5 sec)
       my $t = 0;
       select undef, undef, undef, 0.25
  -        until -e $file && -s _ == 10 || $t++ == 20;
  +        until -e $file && -s _ == SIZE || $t++ == TRIES;
   
       unless (-e $file) {
           t_debug("can't find $file");
  
  
  

Mime
View raw message