nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Kawamura <ijokaruma...@gmail.com>
Subject Re: Email processor test failure
Date Wed, 22 Feb 2017 01:46:45 GMT
Hi Chris,

Are you running this test with multi-thread mode?
The test has ScheduledExecutorService private instance field and it's
replaced @Before each test method. If it runs with multi-threaded
mode, it might be possible the port variable gets confused among each
test.
Each test starts different SMTP server with different port, and
Runnable in each test supposed to use the same port with the
corresponding SMTP server.
I'm not an expert of how java lexical scope works, but the log looks so..

If you're using a mvn flag such as -T4, please try without that.

Thanks,
Koji

On Wed, Feb 22, 2017 at 5:00 AM, Chris Herrera
<chris.herrera07@gmail.com> wrote:
> Thanks All!
>
> Here is some additional information:
>
> Interestingly enough it seems in the surefire report that the SMTP server is starting
on a different port than the test is trying to connect to, unless I’m reading it wrong.
>
> Nothing else strange on the networking side, verified my hosts file is normal, no weird
firewalls, etc...
>
> Env Info:
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_121, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.3", arch: "x86_64", family: “mac"
>
> Additional Surefire Report info:
> [pool-15-thread-1] INFO org.subethamail.smtp.server.SMTPServer - SMTP server *:58738
starting
> [org.subethamail.smtp.server.ServerThread *:58738] INFO org.subethamail.smtp.server.ServerThread
- SMTP server *:58738 started
> [pool-18-thread-1] INFO org.subethamail.smtp.server.SMTPServer - SMTP server *:58840
starting
> [org.subethamail.smtp.server.ServerThread *:58840] INFO org.subethamail.smtp.server.ServerThread
- SMTP server *:58840 started
> org.apache.commons.mail.EmailException: Sending the email to the following server failed
: localhost:58738
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
> at org.apache.commons.mail.Email.send(Email.java:1448)
> at org.apache.nifi.processors.email.TestListenSMTP$1.run(TestListenSMTP.java:78)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.mail.MessagingException: [EOF]
> at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:2074)
> at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:1469)
> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:660)
> at javax.mail.Service.connect(Service.java:295)
> at javax.mail.Service.connect(Service.java:176)
> at javax.mail.Service.connect(Service.java:125)
> at javax.mail.Transport.send0(Transport.java:194)
> at javax.mail.Transport.send(Transport.java:124)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
> ... 9 more
> [pool-21-thread-1] INFO org.subethamail.smtp.server.SMTPServer - SMTP server *:58923
starting
> [org.subethamail.smtp.server.ServerThread *:58923] INFO org.subethamail.smtp.server.ServerThread
- SMTP server *:58923 started
> org.apache.commons.mail.EmailException: Sending the email to the following server failed
: localhost:58840
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
> at org.apache.commons.mail.Email.send(Email.java:1448)
> at org.apache.nifi.processors.email.TestListenSMTP$2.run(TestListenSMTP.java:144)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.mail.MessagingException: [EOF]
> at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:2074)
> at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:1469)
> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:660)
> at javax.mail.Service.connect(Service.java:295)
> at javax.mail.Service.connect(Service.java:176)
> at javax.mail.Service.connect(Service.java:125)
> at javax.mail.Transport.send0(Transport.java:194)
> at javax.mail.Transport.send(Transport.java:124)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
> ... 9 more
> Regards,
> Chris
>
> On Feb 21, 2017, 1:16 PM -0600, Aldrin Piri <aldrinpiri@gmail.com>, wrote:
>> Could you additionally specify your environment? mvn -version should be
>> sufficient.
>>
>> I feel like we have seen this intermittently on Windows with certain JDK
>> updates.
>>
>>
>> On Tue, Feb 21, 2017 at 2:06 PM, Joe Witt <joe.witt@gmail.com> wrote:
>>
>> > Chris,
>> >
>> > Can you look for additional information in the test logs....i've not
>> > seen this behavior before on these processors. That they're all
>> > failing at around 15/16 seconds is interesting too as this is not a
>> > typical timeout value. That said each does is setting a 10 second
>> > timeout. Anyway, lets see what else we can get out of the logs.
>> >
>> > Thanks
>> > Joe
>> >
>> > On Tue, Feb 21, 2017 at 1:57 PM, Chris Herrera
>> > <chris.herrera07@gmail.com> wrote:
>> > > Hi All,
>> > >
>> > > Apologies for apparently going braindead…I’m sure I’m doing something
>> > silly…. I am in the process of starting to work on some custom processors
>> > and controller services, and I am running into an issue with a few tests in
>> > the email processor.
>> > >
>> > > Specifically org.apache.nifi.processors.email.TestListenSMTP is timing
>> > out on validateSuccesfulInteraction… when stepping through it seems as if
>> > it is timing out. However, I also see that there is a test smtp server that
>> > should be stood up for the test…has anyone run into this before.
>> > >
>> > > Thanks a lot!
>> > > Chris Herrera
>> > >
>> > > Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 48.071
>> > sec <<< FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP
>> > > validateSuccessfulInteraction(org.apache.nifi.processors.email.TestListenSMTP)
>> > Time elapsed: 15.04 sec <<< FAILURE!
>> > > java.lang.AssertionError: null
>> > > at org.junit.Assert.fail(Assert.java:86)
>> > > at org.junit.Assert.assertTrue(Assert.java:41)
>> > > at org.junit.Assert.assertTrue(Assert.java:52)
>> > > at org.apache.nifi.processors.email.TestListenSMTP.
>> > validateSuccessfulInteraction(TestListenSMTP.java:91)
>> > >
>> > > validateSuccessfulInteractionWithTls(org.apache.nifi.processors.email.TestListenSMTP)
>> > Time elapsed: 16.518 sec <<< FAILURE!
>> > > java.lang.AssertionError: null
>> > > at org.junit.Assert.fail(Assert.java:86)
>> > > at org.junit.Assert.assertTrue(Assert.java:41)
>> > > at org.junit.Assert.assertTrue(Assert.java:52)
>> > > at org.apache.nifi.processors.email.TestListenSMTP.
>> > validateSuccessfulInteractionWithTls(TestListenSMTP.java:157)
>> > >
>> > > validateTooLargeMessage(org.apache.nifi.processors.email.TestListenSMTP)
>> > Time elapsed: 16.513 sec <<< FAILURE!
>> > > java.lang.AssertionError: null
>> > > at org.junit.Assert.fail(Assert.java:86)
>> > > at org.junit.Assert.assertTrue(Assert.java:41)
>> > > at org.junit.Assert.assertTrue(Assert.java:52)
>> > > at org.apache.nifi.processors.email.TestListenSMTP.
>> > validateTooLargeMessage(TestListenSMTP.java:203)
>> > >
>> >

Mime
View raw message