Hello,
I wrote a simple JUnit 4 test. It just sends a plain email with
JavaMail. When I run this test class from Eclipse, it passes without
problems. However, when I run it with mvn test, the test will fail.
Here is part of the stack trace:
DEBUG SMTP: trying to connect to host "mail.website.com", port 465,
isSSL false
java.lang.AssertionError
at
com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1578)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369)
at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:248)
at javax.mail.Service.connect(Service.java:105)
By following the stack trace, I saw that in SMTPTransport.java:1578
there is the following line:
assert Thread.holdsLock(this);
This is why it fails. Any idea how to run Maven so that this doesn't fail?
Thanks, Csaba
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]