Ignore:
Timestamp:
11/11/11 13:17:43 (20 months ago)
Author:
BrainSlayer
Message:

update proftp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/proftpd/tests/t/lib/ProFTPD/Tests/Config/MaxRetrieveFileSize.pm

    r14672 r17876  
    22 
    33use lib qw(t/lib); 
    4 use base qw(Test::Unit::TestCase ProFTPD::TestSuite::Child); 
     4use base qw(ProFTPD::TestSuite::Child); 
    55use strict; 
    66 
    7 use File::Path qw(mkpath rmtree); 
    87use File::Spec; 
    98use IO::Handle; 
     
    3635  return testsuite_get_runnable_tests($TESTS); 
    3736} 
    38  
    39 sub set_up { 
    40   my $self = shift; 
    41   $self->{tmpdir} = testsuite_get_tmp_dir(); 
    42  
    43   # Create temporary scratch dir 
    44   eval { mkpath($self->{tmpdir}) }; 
    45   if ($@) { 
    46     my $abs_path = File::Spec->rel2abs($self->{tmpdir}); 
    47     die("Can't create dir $abs_path: $@"); 
    48   } 
    49 } 
    50  
    51 sub tear_down { 
    52   my $self = shift; 
    53  
    54   # Remove temporary scratch dir 
    55   if ($self->{tmpdir}) { 
    56     eval { rmtree($self->{tmpdir}) }; 
    57   } 
    58  
    59   undef $self; 
    60 }; 
    6137 
    6238sub maxretrievefilesize_ok { 
     
    152128 
    153129      my $buf; 
    154       $conn->read($buf, 8192); 
    155       $conn->close(); 
     130      $conn->read($buf, 8192, 30); 
     131      eval { $conn->close() }; 
    156132 
    157133      my $expected; 
     
    286262 
    287263      my $buf; 
    288       $conn->read($buf, 8192); 
    289       $conn->close(); 
     264      $conn->read($buf, 8192, 30); 
     265      eval { $conn->close() }; 
    290266 
    291267      $resp_code = $client->response_code(); 
Note: See TracChangeset for help on using the changeset viewer.