OhadR / authentication-flows

oAuth2 sample: auth-server, resource server and client. "Authentication-Flows" is also a sub-module here.
42 stars 54 forks source link

enable tests with mvn-surefire-plugin (not only with eclipse/junit) #60

Closed OhadR closed 10 years ago

OhadR commented 10 years ago

when running the mail-test from eclipse (junit), it passes and sends the email. but when running it from maven (mvn install), it invokes the mvn-surefire-plugin and fails:

java.lang.AssertionError: null 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 org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:306) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:296) at com.ohadr.auth_flows.core.TestMailSender.test(TestMailSender.java:32)


the fix: https://confluence.atlassian.com/display/JIRAKB/java.lang.AssertionError+When+Sending+Mail+Via+SMTP http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html disable assertions from surefire-plugin.