[MAGNOLIA-983] magnolia-module-mail: Tests are broken on Mac OS X Created: 20/Jul/06 Updated: 23/Jan/13 Resolved: 27/Jun/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.0 RC3 |
| Fix Version/s: | 3.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oliver Lietz | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: Mac OS X 10.4.7 PowerPC |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
The tests for magnolia-module-mail are broken - hang on execution. Other platforms not tested so far. (will try to debug when some spare time) |
| Comments |
| Comment by Oliver Lietz [ 21/Jul/06 ] |
|
"server = SimpleSmtpServer.start(SMTP_PORT);" fails silently in AbstractMailTest Throws an exception when trying to bind to privileged port (running as normal user): java.net.BindException: Permission denied Same silent failure when running as root with privileged port. |
| Comment by Oliver Lietz [ 24/Jul/06 ] |
|
It's slightly different on FreeBSD, but tests fail also: ------------------------------------------------------ FreeBSD 6.1-RELEASE i386 |
| Comment by Nicolas Modrzyk [ 25/Jul/06 ] |
|
agreed this is not documented, but it was said on the list, you need a locally running smtp server. The validation of the email being done only while packaging it to be sent, this was the way I was doing it to make at least useful tests. |
| Comment by Oliver Lietz [ 25/Jul/06 ] |
|
Sorry, missed it on the list. Does anybody know the reason for this failure? Does it make sense if we have a working setup with SimpleSmtpServer? Should I try to debug SimpleSmtpServer (and friends)? Maybe it's this bug "[ 1354551 ] Deadlock possible in SimpleSmtpServer.start()": http://sourceforge.net/tracker/index.php?func=detail&aid=1354551&group_id=78413&atid=553186 |
| Comment by Oliver Lietz [ 29/Jul/06 ] |
|
Replaced com.dumbster.smtp with org.subethamail.wiser. Testing works. hasMatchingSubject(String message, String subject) could be improved or replaced by a simple parser - something like javax.mail.internet.MimeMessage.parse(java.io.InputStream is) "Parse the InputStream setting the headers and content fields appropriately", but without the need to setup a javax.mail.Session. Any suggestions? License of Wiser is LGPL. Wiser hasn't a m2 repo yet. |
| Comment by Oliver Lietz [ 29/Jul/06 ] |
|
Shame on me - WiserMessage wraps a proper MimeMessage, so we can use getMimeMessage().getSubject(). |
| Comment by Oliver Lietz [ 29/Jul/06 ] |
|
Prepared a m2-package (rearranged files/directories and created three POMs) of SubEtha smtp and wiser (trunk/1.0.1). |
| Comment by Fabrizio Giustina [ 13/Aug/06 ] |
|
mail tests were not working anymore on windows, looks like wiser doesn't close sockects properly between tests. |
| Comment by Philipp Bracher [ 17/Aug/06 ] |
|
Hi Fabrizio in the latest pom there was the 1.0.3-SNAPSHOT version used for subethamail, which is not deployed in the maven repository. This was breaking the build. I moved the version back to 1.0.2 now, so that it builds again. Can you veryfie quickly if this is ok. Can you deploy the jar otherwise. Thanks |
| Comment by Oliver Lietz [ 27/Oct/06 ] |
|
Testing (r6951) works on FreeBSD and Mac OS X with SubEthaMail 1.0.3 and 1.1. |
| Comment by Oliver Lietz [ 27/Oct/06 ] |
|
This is a patch for using SubEthaMail 1.1 (not yet on public repo). Removed the java14 classifier for the retrotranslated version of SubEthaMail. We can use the java5 version for testing. |
| Comment by Magnolia International [ 27/Oct/06 ] |
|
any idea when it's going to be in a public repo ? |
| Comment by Oliver Lietz [ 30/Oct/06 ] |
|
No answer from Jon and Jeff on this yet. Can we put 1.1 on http://svn.magnolia.info/maven/m2/ ? |
| Comment by Magnolia International [ 31/May/07 ] |
|
Oliver, if you still have no answer from these guys, maybe you want to follow this |
| Comment by Oliver Lietz [ 31/May/07 ] |
|
Same here, tests are fine on Mac OS/FreeBSD (other platforms?). Haven't heard anything from them and it looks like they dropped Maven and use Ant again. We should update SubEthaMail to 1.2 because they fixed a bug and switched license from LGPL to ASFL 2.0. I will look into this as soon as possible, prepare a mavenized 1.2 package and ask them to add made changes to their svn repo/upload to public m2 repo. btw: we shouldn't use private mail addresses for testing but follow RFC 2606 (http://www.ietf.org/rfc/rfc2606.txt) and use e.g. test@example.com instead. Private mail addresses smell a little bit like "home-phoning". |
| Comment by Magnolia International [ 31/May/07 ] |
|
sure, fix away! |
| Comment by Magnolia International [ 27/Jun/08 ] |
|
looking into this again - just a note: as far as I can tell, all patches attached so far have been applied. |
| Comment by Magnolia International [ 27/Jun/08 ] |
|
after upgrading to subethamail 1.2, i can't seem to get these tests failing again. Please reopen if it happens again. |