[Rt-commit] r17085 - rt/3.8/trunk/lib/RT/Test
clkao at bestpractical.com
clkao at bestpractical.com
Wed Dec 3 06:28:36 EST 2008
Author: clkao
Date: Wed Dec 3 06:28:35 2008
New Revision: 17085
Modified:
rt/3.8/trunk/lib/RT/Test/Email.pm
Log:
fetch_caught_mails is clearing the mailbox, so just read once.
Modified: rt/3.8/trunk/lib/RT/Test/Email.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test/Email.pm (original)
+++ rt/3.8/trunk/lib/RT/Test/Email.pm Wed Dec 3 06:28:35 2008
@@ -65,10 +65,11 @@
# do cleanup in that case.
return if $Test->{Original_Pid} != $$;
- if (scalar RT::Test->fetch_caught_mails) {
- diag ((scalar RT::Test->fetch_caught_mails)." uncaught notification email at end of test: ");
+ my @mail = RT::Test->fetch_caught_mails;
+ if (scalar @mail) {
+ diag ((scalar @mail)." uncaught notification email at end of test: ");
diag "From: @{[ $_->header('From' ) ]}, Subject: @{[ $_->header('Subject') ]}"
- for RT::Test->fetch_caught_mails;
+ for @mail;
die;
}
}
More information about the Rt-commit
mailing list