diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 01:08:48 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 01:08:48 -0700 |
| commit | d32f4c43b0fde5c18b8c2ee8f3d4cb9c6861a403 (patch) | |
| tree | a6effb73ebaa22ae23548f0cacd396b82227258f /rt/t/mail | |
| parent | d6d7984aac204cfb374ac571b3b2871bf6aeabd5 (diff) | |
RT 3.8.17
Diffstat (limited to 'rt/t/mail')
| -rw-r--r-- | rt/t/mail/gnupg-incoming.t | 31 | ||||
| -rw-r--r-- | rt/t/mail/sendmail.t | 3 |
2 files changed, 31 insertions, 3 deletions
diff --git a/rt/t/mail/gnupg-incoming.t b/rt/t/mail/gnupg-incoming.t index c34ed997a..c87925aa3 100644 --- a/rt/t/mail/gnupg-incoming.t +++ b/rt/t/mail/gnupg-incoming.t @@ -2,7 +2,7 @@ use strict; use warnings; -use RT::Test tests => 47; +use RT::Test tests => 51; plan skip_all => 'GnuPG required.' unless eval 'use GnuPG::Interface; 1'; @@ -243,7 +243,6 @@ RT::Test->close_mailgate_ok($mail); ok(index($orig->Content, $buf) != -1, 'found original msg'); } - # test for signed mail by other key $buf = ''; @@ -355,3 +354,31 @@ is(@mail, 1, 'caught outgoing mail.'); unlike( ($attach ? $attach->Content : ''), qr'really should not be there either'); } + +# test that if it gets base64 transfer-encoded long mail then it doesn't hang +{ + local $SIG{ALRM} = sub { + ok 0, "timed out, web server is probably in deadlock"; + exit; + }; + alarm 30; + $buf = encode_base64('a'x(250*1024)); + $mail = RT::Test->open_mailgate_ok($baseurl); + print $mail <<"EOF"; +From: recipient\@example.com +To: general\@$RT::rtname +Content-transfer-encoding: base64 +Subject: Long not encrypted message for queue + +$buf +EOF + RT::Test->close_mailgate_ok($mail); + alarm 0; + + my $tick = RT::Test->last_ticket; + is( $tick->Subject, 'Long not encrypted message for queue', + "Created the ticket" + ); + my $content = $tick->Transactions->First->Content; + like $content, qr/a{1024,}/, 'content is not lost'; +} diff --git a/rt/t/mail/sendmail.t b/rt/t/mail/sendmail.t index 1f97bbb9f..215fba78a 100644 --- a/rt/t/mail/sendmail.t +++ b/rt/t/mail/sendmail.t @@ -535,4 +535,5 @@ diag q{regression test for #5248 from rt3.fsck.com} if $ENV{TEST_VERBOSE}; # Don't taint the environment $everyone->PrincipalObj->RevokeRight(Right =>'SuperUser'); -1; + +@scrips_fired = (); |
