- Timestamp:
- 11/11/11 13:17:43 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/router/proftpd/tests/t/lib/ProFTPD/Tests/Config/MaxRetrieveFileSize.pm
r14672 r17876 2 2 3 3 use lib qw(t/lib); 4 use base qw( Test::Unit::TestCaseProFTPD::TestSuite::Child);4 use base qw(ProFTPD::TestSuite::Child); 5 5 use strict; 6 6 7 use File::Path qw(mkpath rmtree);8 7 use File::Spec; 9 8 use IO::Handle; … … 36 35 return testsuite_get_runnable_tests($TESTS); 37 36 } 38 39 sub set_up {40 my $self = shift;41 $self->{tmpdir} = testsuite_get_tmp_dir();42 43 # Create temporary scratch dir44 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 dir55 if ($self->{tmpdir}) {56 eval { rmtree($self->{tmpdir}) };57 }58 59 undef $self;60 };61 37 62 38 sub maxretrievefilesize_ok { … … 152 128 153 129 my $buf; 154 $conn->read($buf, 8192 );155 $conn->close();130 $conn->read($buf, 8192, 30); 131 eval { $conn->close() }; 156 132 157 133 my $expected; … … 286 262 287 263 my $buf; 288 $conn->read($buf, 8192 );289 $conn->close();264 $conn->read($buf, 8192, 30); 265 eval { $conn->close() }; 290 266 291 267 $resp_code = $client->response_code();
Note: See TracChangeset
for help on using the changeset viewer.
