[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425201#comment-15425201 ] ASF GitHub Bot commented on NIFI-2519: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/871 > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Joseph Witt > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425199#comment-15425199 ] ASF subversion and git services commented on NIFI-2519: --- Commit e7288af859d00d6a4d12631d73a92404e31ba7f4 in nifi's branch refs/heads/master from Andre F de Miranda [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=e7288af ] NIFI-2519 - ListenSMTP addresses mismatch between smtp.src attribute documentation and attribute.put > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Joseph Witt > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425172#comment-15425172 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/871#discussion_r75184556 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java --- @@ -149,7 +149,7 @@ public void done() { } attributes.put("smtp.helo", context.getHelo()); -attributes.put("smtp.remote.addr", context.getRemoteAddress().toString()); +attributes.put("smtp.src", context.getRemoteAddress().toString().substring(1)); --- End diff -- Changing this part to ``` SocketAddress address = context.getRemoteAddress(); if (address != null) { // will extract and format source address if available String strAddress = address instanceof InetSocketAddress ? ((InetSocketAddress) address).getHostString() + ":" + ((InetSocketAddress) address).getPort() : context.getRemoteAddress().toString(); attributes.put("smtp.src", strAddress); } ``` . . . and merging after it. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Joseph Witt > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15422095#comment-15422095 ] ASF GitHub Bot commented on NIFI-2519: -- GitHub user trixpan opened a pull request: https://github.com/apache/nifi/pull/871 NIFI-2519 - ListenSMTP addresses mismatch between smtp.src attribute … …documentation and attribute.put You can merge this pull request into a Git repository by running: $ git pull https://github.com/trixpan/nifi NIFI-2519 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/871.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #871 commit 47e4ca973c4d13be8452d09e67dd04d3493e4022 Author: Andre F de MirandaDate: 2016-08-15T23:13:39Z NIFI-2519 - ListenSMTP addresses mismatch between smtp.src attribute documentation and attribute.put > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15422093#comment-15422093 ] Andre commented on NIFI-2519: - So it turns out to be master still has the issue: Code writes {code} attributes.put("smtp.remote.addr", context.getRemoteAddress().toString()); {code} Resulting on the data to be present but under a different name. Pushed a small PR to: 1. rename attribute.put 2. remove the leading {{/}} as it is a Java {{toString()}} thing more than a proper IP notation. 3. reword property description property (as recording source IP and port is good practice) > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15422048#comment-15422048 ] Andre commented on NIFI-2519: - [~joewitt] I was migrating some real workloads from my dev version to the new master and noted that {{smtp.src}} is not being written to the flowfile. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420415#comment-15420415 ] ASF subversion and git services commented on NIFI-2519: --- Commit d3b96dcac1d18c2da3d5cab2238e5de0936f63c6 in nifi's branch refs/heads/master from [~joewitt] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=d3b96dc ] NIFI-2519 This closes #856. aligned threading model with subethastmp > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420413#comment-15420413 ] ASF subversion and git services commented on NIFI-2519: --- Commit 48fa76ecfff410b09a0b97fd70468e028066e990 in nifi's branch refs/heads/master from [~ozhurakousky] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=48fa76e ] NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420409#comment-15420409 ] ASF subversion and git services commented on NIFI-2519: --- Commit 48fa76ecfff410b09a0b97fd70468e028066e990 in nifi's branch refs/heads/master from [~ozhurakousky] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=48fa76e ] NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420407#comment-15420407 ] ASF subversion and git services commented on NIFI-2519: --- Commit 48fa76ecfff410b09a0b97fd70468e028066e990 in nifi's branch refs/heads/master from [~ozhurakousky] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=48fa76e ] NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420412#comment-15420412 ] ASF subversion and git services commented on NIFI-2519: --- Commit 48fa76ecfff410b09a0b97fd70468e028066e990 in nifi's branch refs/heads/master from [~ozhurakousky] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=48fa76e ] NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420414#comment-15420414 ] ASF subversion and git services commented on NIFI-2519: --- Commit 48fa76ecfff410b09a0b97fd70468e028066e990 in nifi's branch refs/heads/master from [~ozhurakousky] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=48fa76e ] NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420416#comment-15420416 ] ASF GitHub Bot commented on NIFI-2519: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/856 > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420323#comment-15420323 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz closed the pull request at: https://github.com/apache/nifi/pull/827 > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420321#comment-15420321 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/856 +1 > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420303#comment-15420303 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/856#discussion_r74700141 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java --- @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.processors.email.smtp; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import org.apache.commons.io.IOUtils; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.exception.FlowFileAccessException; +import org.apache.nifi.processors.email.ListenSMTP; +import org.apache.nifi.stream.io.LimitingInputStream; +import org.apache.nifi.util.StopWatch; + +import org.subethamail.smtp.MessageContext; +import org.subethamail.smtp.MessageHandler; +import org.subethamail.smtp.RejectException; +import org.subethamail.smtp.TooMuchDataException; +import org.subethamail.smtp.server.SMTPServer; + +/** + * A simple consumer that provides a bridge between 'push' message distribution + * provided by {@link SMTPServer} and NiFi polling scheduler mechanism. + */ +public class SmtpConsumer implements MessageHandler { + +private String from = null; +private final List recipientList = new ArrayList<>(); +private final MessageContext context; +private final ProcessSessionFactory sessionFactory; +private final int port; +private final int maxMessageSize; +private final ComponentLog log; +private final String host; + +public SmtpConsumer( +final MessageContext context, +final ProcessSessionFactory sessionFactory, +final int port, +final String host, +final ComponentLog log, +final int maxMessageSize +) { +this.context = context; +this.sessionFactory = sessionFactory; +this.port = port; +if (host == null || host.trim().isEmpty()) { +this.host = context.getSMTPServer().getHostName(); +} else { +this.host = host; +} +this.log = log; +this.maxMessageSize = maxMessageSize; +} + +String getFrom() { +return from; +} + +List getRecipients() { +return Collections.unmodifiableList(recipientList); +} + +@Override +public void data(final InputStream data) throws RejectException, TooMuchDataException, IOException { +final ProcessSession processSession = sessionFactory.createSession(); +final StopWatch watch = new StopWatch(); +watch.start(); +try { +FlowFile flowFile = processSession.create(); +final AtomicBoolean limitExceeded = new AtomicBoolean(false); +flowFile = processSession.write(flowFile, (OutputStream out) -> { +final LimitingInputStream lis = new LimitingInputStream(data, maxMessageSize); +IOUtils.copy(lis, out); +if (lis.hasReachedLimit()) {
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420249#comment-15420249 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/856 :+1: Tested manually and also forced some exceptions. ListenSMTP seems to handle errors very well, example: Place breakpoint on `processSession.getProvenanceReporter().receive(flowFile, "smtp://" + host + ":" + port + "/", watch.getDuration(TimeUnit.MILLISECONDS)); ` ``` 220 bermudatriangle ESMTP Apache NiFi SMTP helo , 250 bermudatriangle mail from: x 250 Ok rcpt to: y 250 Ok data 354 End data with . a . ``` evaluate flowFile so that is null. Let process continue. Following message is returned. ``` 421 4.3.0 Mail system failure, closing transmission channel Connection closed by foreign host. ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420227#comment-15420227 ] Joseph Witt commented on NIFI-2519: --- Created a new PR based on Oleg's previous PR. After tweaking and removing issues blocking proper processor stopping there were data corruption issues still present during testing. Further evaluation revealed it was due to improper use of the subethasmtp API specifically as it relates to the MessageHandler which is something they expect to create for each message but that our implementation was creating as a single instance for the processor. Also noticed that the recipient method was just overwriting previous recipient so changed that to accept multiple calls and write out all specified recipients. So, taking a step back and in looking through this discussion thread and thinking about it the requirements are: SubethaSMTP has its own threading and lifecycle model. It has a message handler with start/stop methods we can connect to. NiFi has its own threading and lifecycle model. We want to ensure that unless we capture and commit data we return exceptions to the user. This ensures no data loss but could mean duplication. This is ok. We want to ensure data is streamed from the client directly to disk. We want to ensure the client cannot send arbitrarily large data. We want to ensure Subethasmtp doesn't open too many connections. We want to ensure when the processor is stopped it will kill all the subethasmtp threads. We want to capture all the flow file metadata we can about the client ip, host, certificates, etc.. We should be able to give the message hanlder the process session factory and let it handle the lifecycle of nifi directly. We don't need to make NiFi threads in addition to their threads. Let's just use their model. So implemented PR 856. Unit tests cover normal non secure and TLS based transfers and excessive message size. Tested excessive sized message. Works. Tested manual mailing with intentional timeouts during DATA and other commands. Works. Tested killing sender and killing ListenSMTP. Behaved as expected and well. Tested with more senders than ListenSMTP could handle. It rejected excess requests. Tested at full rate. Seems reasonable. Tested and can no longer reproduce threading issues. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15420223#comment-15420223 ] ASF GitHub Bot commented on NIFI-2519: -- GitHub user joewitt opened a pull request: https://github.com/apache/nifi/pull/856 NIFI-2519 aligned processor to leverage the subethasmtp threading model You can merge this pull request into a Git repository by running: $ git pull https://github.com/joewitt/incubator-nifi NIFI-2519 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/856.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #856 commit c4d750993b46e72506d7e19a5c5591ad1dc3f3b9 Author: Oleg ZhurakouskyDate: 2016-08-10T14:19:17Z NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS NIFI-2519 addressed PR comments, polishing - fixed intermittent deadlock on processor stop and added test for it - the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile - other minor fixes NIFI-2519 addressed lates PR comments NIFI-2519 added better messaging when server closes the connection NIFI-2519 some polishing and additional tests to validate deadlocks NIFI-2519 address latest PR comments fixed deadlock condition for when the consumer is stopped while server is distributing messages fixed MAX message size issue ensuring it is validated set max connections to SMTPServer polished pom added L NIFI-2519 PR comments - fixed LICENSE - Added usage of LimitingInputStream - simplified SmtpConsumer by removing hasMessage operation commit b7e65001471e83103ebfdfc85b4bdf0fa90820fa Author: joewitt Date: 2016-08-14T05:10:47Z NIFI-2519 aligned threading model with subethastmp > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15419512#comment-15419512 ] Joseph Witt commented on NIFI-2519: --- the source of the livelock is clear and I believe resolved. Will have a patch for that soon. Basically the 'data' method was checking if stopped but then in an offer call forever so if stopped after the initial check but while waiting for space to be available (which it never would be since consumers were stopped) it will just sit there. The solution appears as simple as stop indefinite offer but rather offer in a loop and check if we should give up in the loop due to stoppage. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15419474#comment-15419474 ] Joseph Witt commented on NIFI-2519: --- Deadlock still there... {quote} "StandardProcessScheduler Thread-5" Id=156 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@3cd8b9a6 at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1465) at org.subethamail.smtp.server.ServerThread.shutdownSessions(ServerThread.java:239) at org.subethamail.smtp.server.ServerThread.shutdown(ServerThread.java:190) at org.subethamail.smtp.server.SMTPServer.stop(SMTPServer.java:310) - waiting on org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@1c3fa4a6 at org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer.stop(ListenSMTP.java:376) - waiting on org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@1c3fa4a6 at org.apache.nifi.processors.email.ListenSMTP.stop(ListenSMTP.java:230) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125) at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotations(ReflectionUtils.java:233) at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotation(ReflectionUtils.java:85) at org.apache.nifi.controller.StandardProcessorNode$2.run(StandardProcessorNode.java:1326) 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) Number of Locked Synchronizers: 1 - java.util.concurrent.ThreadPoolExecutor$Worker@246d3a7b "org.subethamail.smtp.server.Session-/127.0.0.1:62163" Id=207 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@3d3d0835 at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ArrayBlockingQueue.offer(ArrayBlockingQueue.java:379) at org.apache.nifi.processors.email.SmtpConsumer.data(SmtpConsumer.java:147) at org.subethamail.smtp.command.DataCommand.execute(DataCommand.java:64) at org.subethamail.smtp.server.RequireTLSCommandWrapper.execute(RequireTLSCommandWrapper.java:30) at org.subethamail.smtp.server.CommandHandler.handleCommand(CommandHandler.java:99) at org.subethamail.smtp.server.Session.runCommandLoop(Session.java:244) at org.subethamail.smtp.server.Session.run(Session.java:145) 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) Number of Locked Synchronizers: 1 - java.util.concurrent.ThreadPoolExecutor$Worker@6151d941 {quote} Also, got corrupted emails through this. Started up multiple threads on PutEmail and on ListenSMTP. Noticed it was slower than single threaded and then it started having corrupt messages on occassion. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15419251#comment-15419251 ] ASF GitHub Bot commented on NIFI-2519: -- Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/827 the new PR uses instance array for buffer. This will be a problem under multiple threads. the references in LICENSE to JOpt Simple and JLines..is this copy and paste or are those really in the build? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > Attachments: > 0001-NIFI-2519-fixed-max-connections-and-max-size-enforce.patch > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418175#comment-15418175 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74527077 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +90,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() --- End diff -- @olegz is SMTP_MAXIMUM_CONNECTIONS being enforced at all? ``` $ date && telnet 0 2525 Fri Aug 12 09:02:31 AEST 2016 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi ``` $ date && telnet 0 2525 Fri Aug 12 09:02:30 AEST 2016 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi I did this test and it doesn't seem to be: ``` $ date && netstat -an| grep 2525 | pcregrep "2525\s+ES" Fri Aug 12 09:02:33 AEST 2016 tcp0 0 0.0.0.0:25250.0.0.0:* LISTEN tcp0 0 127.0.0.1:38840 127.0.0.1:2525 ESTABLISHED tcp0 0 127.0.0.1:38842 127.0.0.1:2525 ESTABLISHED ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418361#comment-15418361 ] Joseph Witt commented on NIFI-2519: --- [~ozhurakousky] Patch that fixes max connections and enforces max data size is attached. Also, got in a 'STOPPING' state again. Thread dump results related to SMTP included {quote} "org.subethamail.smtp.server.Session-/127.0.0.1:61707" Id=88 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@26e92b1f at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ArrayBlockingQueue.offer(ArrayBlockingQueue.java:379) at org.apache.nifi.processors.email.SmtpConsumer.data(SmtpConsumer.java:134) at org.subethamail.smtp.command.DataCommand.execute(DataCommand.java:64) at org.subethamail.smtp.server.RequireTLSCommandWrapper.execute(RequireTLSCommandWrapper.java:30) at org.subethamail.smtp.server.CommandHandler.handleCommand(CommandHandler.java:99) at org.subethamail.smtp.server.Session.runCommandLoop(Session.java:244) at org.subethamail.smtp.server.Session.run(Session.java:145) 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) Number of Locked Synchronizers: 1 - java.util.concurrent.ThreadPoolExecutor$Worker@508e2f01 {quote} {quote} "StandardProcessScheduler Thread-2" Id=62 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@499006ab at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1465) at org.subethamail.smtp.server.ServerThread.shutdownSessions(ServerThread.java:239) at org.subethamail.smtp.server.ServerThread.shutdown(ServerThread.java:190) at org.subethamail.smtp.server.SMTPServer.stop(SMTPServer.java:310) - waiting on org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@4bd2366c at org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer.stop(ListenSMTP.java:355) - waiting on org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@4bd2366c at org.apache.nifi.processors.email.ListenSMTP.stop(ListenSMTP.java:228) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125) at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotations(ReflectionUtils.java:233) at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotation(ReflectionUtils.java:85) at org.apache.nifi.controller.StandardProcessorNode$2.run(StandardProcessorNode.java:1326) 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) Number of Locked Synchronizers: 1 - java.util.concurrent.ThreadPoolExecutor$Worker@75caecf7 {quote} Also 1) There is no LICENSE and NOTICE information present in the nifi-email-nar. There definitely should be. There are numerous jars from Spring and others that must be accounted for and if necessary needs to be rolled up to nifi-assembly as well. 2) Default throughput is pretty poor due to the yield call happening whenever there is no data. The processor call to check for a message should do some short term polling/blocking of say 10-20ms rather
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418261#comment-15418261 ] Joseph Witt commented on NIFI-2519: --- Regarding message size: Looks like we need to do it ourselves. The size being sent is just a advertising sort of thing. https://github.com/voodoodyne/subethasmtp/blob/3.1.7/src/main/java/org/subethamail/smtp/server/SMTPServer.java#L106-L113 Regarding max connections We do have the property but we're never setting it on the subethasmtp api. Will provide a patch to address these two remaining items shortly. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418197#comment-15418197 ] Joseph Witt commented on NIFI-2519: --- sounds like timeouts are sorted. We can easily protect from bad acting clients sending arbitrarily large data by just killing the connection if they exceed a max size and we know precisely how much we're writing to the repo. So that we should definitely do. And yes if the client can make arbitrary number of connections and exhaust resources we should address that as well. I'll take a look at both as I dig through the PR more fully. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418184#comment-15418184 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74527655 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +90,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() --- End diff -- @olegz If we cannot enforce Size, Timeout and Max Connections perhaps its time to consider changing the SMTP server API used here? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418178#comment-15418178 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74527190 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +90,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() --- End diff -- @olegz I imagined so. Not working as expected though (not sure why to be honest). > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418176#comment-15418176 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74527137 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +90,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() --- End diff -- It is propagated to the target API > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15418074#comment-15418074 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 @joewitt @trixpan Just pushed one more commit (un-squashed) with some minor polishing and few additional tests to validate that SmtpConsumer does not produce deadlocks due to its synchronous nature while connecting two threads (SMTPServer and NiFi). Let me know when I should squash it. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417612#comment-15417612 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 @olegz thanks for the clarification. Just so that we are on the same page, I am not concerned about the DFM in this case. What I mean by notification is the following: SMTP allows you to convey messages back to the client (These messages are called reply codes). You can send a 5XX reply back and the server will not retry Or you can send a 4XX and the server will retry after a few minutes. Send nothing and reaction will depend on who is sending. Here's a list: http://www.greenend.org.uk/rjk/tech/smtpreplies.html This is why this was in here: https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/handler/SMTPResultCode.java > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417610#comment-15417610 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 @trixpan with regard to "Read timeout" I've just added better exception handling to notify user https://github.com/apache/nifi/pull/827/commits/406b37b249e487f73bae5a260bd5aed05d320192#diff-be7be540c5e3dfb436cea96d2073e28fR216 > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417597#comment-15417597 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 @trixpan just confirmed, the "Read timed out" exception is the correct behavior, but I will wrap it into a nicer log message. But just to confirm the behavior is expected > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417590#comment-15417590 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 @olegz have you pushed the notification recently? I got just an abrupt termination ``` $ telnet 0 2525 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi helo . 250 localhost mail from: x 250 Ok rcpt to: y 250 Ok data 354 End data with . waiting for server to get bored Connection closed by foreign host. ``` Note the connection close as soon I stop the server > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417586#comment-15417586 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 The above is actually correct and is exactly what we were aiming for. No data loss. There is actually new test that validates for that exact message. So all is good. User is notified that something went wrong and can resend the message > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417581#comment-15417581 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 Stopping the processor with an agent connected also seems to throw an exception (not sure if expected) ``` 2016-08-12 01:42:06,593 INFO [StandardProcessScheduler Thread-7] org.subethamail.smtp.server.SMTPServer SMTP server *:2525 stopping 2016-08-12 01:42:06,594 INFO [org.subethamail.smtp.server.ServerThread *:2525] org.subethamail.smtp.server.ServerThread SMTP server *:2525 stopped 2016-08-12 01:42:06,596 ERROR [org.subethamail.smtp.server.Session-/127.0.0.1:38072] org.subethamail.smtp.server.Session Unexpected error in the SMTP handler thread java.lang.IllegalStateException: NIFI Consumer was stopped before message was successfully consumed by NiFi at org.apache.nifi.processors.email.SmtpConsumer.data(SmtpConsumer.java:125) ~[na:na] at org.subethamail.smtp.command.DataCommand.execute(DataCommand.java:64) ~[na:na] at org.subethamail.smtp.server.RequireTLSCommandWrapper.execute(RequireTLSCommandWrapper.java:30) ~[na:na] at org.subethamail.smtp.server.CommandHandler.handleCommand(CommandHandler.java:99) ~[na:na] at org.subethamail.smtp.server.Session.runCommandLoop(Session.java:244) ~[na:na] at org.subethamail.smtp.server.Session.run(Session.java:145) ~[na:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] 2016-08-12 01:42:06,597 ERROR [pool-33-thread-1] org.apache.nifi.NiFi An Unknown Error Occurred in Thread Thread[pool-33-thread-1,5,main]: java.lang.IllegalStateException: NIFI Consumer was stopped before message was successfully consumed by NiFi 2016-08-12 01:42:06,599 ERROR [pool-33-thread-1] org.apache.nifi.NiFi java.lang.IllegalStateException: NIFI Consumer was stopped before message was successfully consumed by NiFi at org.apache.nifi.processors.email.SmtpConsumer.data(SmtpConsumer.java:125) ~[na:na] at org.subethamail.smtp.command.DataCommand.execute(DataCommand.java:64) ~[na:na] at org.subethamail.smtp.server.RequireTLSCommandWrapper.execute(RequireTLSCommandWrapper.java:30) ~[na:na] at org.subethamail.smtp.server.CommandHandler.handleCommand(CommandHandler.java:99) ~[na:na] at org.subethamail.smtp.server.Session.runCommandLoop(Session.java:244) ~[na:na] at org.subethamail.smtp.server.Session.run(Session.java:145) ~[na:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_91] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91] ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO]
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417568#comment-15417568 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 1. Start ListenSMTP port 2525 with 1 maximum connection, 10 seconds of timeout ``` $ telnet 0 2525 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi helo . 250 localhost mail from: x 250 Ok rcpt to: x 250 Ok data 354 End data with . ``` wait for longer than timeout > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417560#comment-15417560 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 @trixpan i think you've closed client while it was in he middle of reading InputStream. If that's the case then yes the stack trace above is exactly what one would expect. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417547#comment-15417547 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 @trixpan could you please describe scenario that triggered the above exception? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417540#comment-15417540 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 @olegz is this expected? ``` 2016-08-12 01:23:59,420 ERROR [Timer-Driven Process Thread-6] o.a.nifi.processors.email.ListenSMTP org.apache.nifi.processor.exception.ProcessException: IOException thrown from ListenSMTP[id=771e0608-0156-1000-832a-7f44efc04123]: java.net.SocketTimeoutException: Read timed out at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2138) ~[nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.processors.email.ListenSMTP.lambda$onTrigger$0(ListenSMTP.java:202) ~[nifi-email-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.processors.email.SmtpConsumer.consumeUsing(SmtpConsumer.java:104) ~[nifi-email-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.processors.email.ListenSMTP.onTrigger(ListenSMTP.java:199) ~[nifi-email-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1060) [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:127) [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_91] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_91] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_91] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_91] at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_91] at java.net.SocketInputStream.read(SocketInputStream.java:170) ~[na:1.8.0_91] at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_91] at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[na:1.8.0_91] at java.io.BufferedInputStream.read(BufferedInputStream.java:265) ~[na:1.8.0_91] at org.subethamail.smtp.io.DotTerminatedInputStream.readWrappedStream(DotTerminatedInputStream.java:109) ~[subethasmtp-3.1.7.jar:June 16 2012] at org.subethamail.smtp.io.DotTerminatedInputStream.read(DotTerminatedInputStream.java:75) ~[subethasmtp-3.1.7.jar:June 16 2012] at org.subethamail.smtp.io.DotUnstuffingInputStream.read(DotUnstuffingInputStream.java:47) ~[subethasmtp-3.1.7.jar:June 16 2012] at org.subethamail.smtp.io.DotUnstuffingInputStream.read(DotUnstuffingInputStream.java:76) ~[subethasmtp-3.1.7.jar:June 16 2012] at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[na:1.8.0_91] at org.subethamail.smtp.io.ReceivedHeaderStream.read(ReceivedHeaderStream.java:131) ~[subethasmtp-3.1.7.jar:June 16 2012] at org.subethamail.smtp.io.ReceivedHeaderStream.read(ReceivedHeaderStream.java:146) ~[subethasmtp-3.1.7.jar:June 16 2012] at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2146) ~[commons-io-2.5.jar:2.5] at org.apache.commons.io.IOUtils.copy(IOUtils.java:2102) ~[commons-io-2.5.jar:2.5] at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2123) ~[commons-io-2.5.jar:2.5] at org.apache.commons.io.IOUtils.copy(IOUtils.java:2078) ~[commons-io-2.5.jar:2.5] at org.apache.nifi.processors.email.ListenSMTP$1.process(ListenSMTP.java:205) ~[nifi-email-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417537#comment-15417537 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on the issue: https://github.com/apache/nifi/pull/827 @joewitt, @olegz code is a great improvement to the previous code. I do think the the removal of the maximum message size and timeout checks should be addressed as soon as possible: I base my opinion solely on the fact their absence will cause issues to the clients sending emails/flows via this interface. As the processor currently lacks the ability to provide the appropriate SMTP reply codes back to the connecting clients, both ListenSMTP and connecting MTAs will waste resource every time a a connection times out (I am not 100% sure how the size issue will unfold). Postfix documentation describes this scenario: > smtp_data_done_timeout (default: 600s) > The Postfix SMTP client time limit for sending the SMTP ".", and for receiving the remote SMTP server response. > > When no response is received within the deadline, a warning is logged that the mail may be delivered multiple times. Note the whooping 600s before postfix gives up and disconnect. Having said that, I am happy to defer this decision to the wider group. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417502#comment-15417502 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 Ok @joewitt @trixpan latest comments are addressed in the latest commit. Please review > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417479#comment-15417479 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74449761 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -31,101 +30,75 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; import org.apache.nifi.annotation.behavior.WritesAttribute; import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; -import org.apache.nifi.processor.ProcessContext; -import org.apache.nifi.processor.ProcessSession; -import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.springframework.util.StringUtils; +import org.subethamail.smtp.MessageContext; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") +@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " ++ "allowing nifi to listen for incoming email. Note this server does not perform any email " ++ "validation. If direct exposure to the internet is sought, it may be a better idea to use " ++ "the combination of NiFi and an industrial scale MTA (e.g. Postfix)") @WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal", description = "The principal for each of the " + -"certificates used by
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417469#comment-15417469 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on the issue: https://github.com/apache/nifi/pull/827 i see now. Putting it in > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417410#comment-15417410 ] ASF GitHub Bot commented on NIFI-2519: -- Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/827 based on @olegz and @trixpan comments about port 25 i agree we should leave it unset. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417274#comment-15417274 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74425136 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- If you are intending to speak SMTP tgan you need to follow the relevant RFC, this means a connecting MTA should be actively informed of a time out otherwise it will indefinitely hang connected as you do not return a 4XX code nor an ok, instead we just leave the connection for dead. This means all clients will have to wait for their own timeouts before disconnecting > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417290#comment-15417290 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74427203 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- Agree with that. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417282#comment-15417282 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74425869 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- We can definitely look at this as an improvement in the future > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417280#comment-15417280 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74425691 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- I have no intention to speak SMTP. I am relying on the underlying API to do that and if it's inadequate, then let's look for a better API. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417259#comment-15417259 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74423248 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- @olegz I see where you come from but put file is controlled by the DFM, ListenSMTP is an exposed service True, we don't do it everywhere but it is present on GetFile as well as other processors crossing administrative domains (DFM <> FS) and so it goes > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417247#comment-15417247 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74422525 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- I am not sure hat you're saying. If Subethasmtp is inadequate API, then we have to scrap it and use something different. But once again, let's keep in mind that the job of this processor is to simply open up a socket with attached application layer capable of speaking SMTP. That is all. For anything else use commercial server and attache to it via available mail protocols. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! >
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417238#comment-15417238 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74421827 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- Yes it goes straight to disc via the Function that is passed to the SmtpConsumer. As far as enforcing data size we can address it in the future if that is a problem. For example we don't have the same enforcement in PutFile and other processors unless memory is involved which in this case it isn't. Also, in all honesty I can't see someone using ListenSMTP or email in general to send large data or to move data. There are better more suitable protocols for it. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417235#comment-15417235 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74421721 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- It will cause clients to hang around indefinitely Subethasmtp is a weird API. I don't truly understand the reason why it was coded like that but it transfers good chunks of the smtp conversation to the developer making use of it. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417221#comment-15417221 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74420800 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- I imagine you write straight to disk? If so we should enforce this somehow. It would be sort of concerning to have a client filling up your disk with a single message? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417199#comment-15417199 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74418537 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- Same as above. The property is simply propagated to the underlying API > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417198#comment-15417198 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74418332 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") -.displayName("SMTP hostname") -.description("The hostname to be embedded into the banner displayed when an " + -"SMTP client connects to the processor TCP port .") -.required(true) -.expressionLanguageSupported(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); - -protected static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_CONNECTIONS = new PropertyDescriptor.Builder() .name("SMTP_MAXIMUM_CONNECTIONS") .displayName("Maximum number of SMTP connection") .description("The maximum number of simultaneous SMTP connections.") .required(true) +.defaultValue("1") .expressionLanguageSupported(false) .addValidator(StandardValidators.INTEGER_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_TIMEOUT = new PropertyDescriptor.Builder() --- End diff -- Is SMTP_TIMEOUT being enforced at the DATA stage? The server seems to hang around the data stage with the connection open no matter how long the client idles for. Typing . and quit do not work ``` $ time telnet 0 2525 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi helo . 250 localhost mail from: x 250 Ok rcpt to: a 250 Ok data 354 End data with . H . ^] telnet> quit Connection closed. real1m24.348s user0m0.000s sys 0m0.002s ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4,
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417177#comment-15417177 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74417054 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- I was just propagating property value to it's corresponding property in SMTPServer, so IMO if server doesn't care why should we? Note that with the refactoring we never write a message into memory so even if you try to send TB it will be successful. If on the other hand we are to provide some type of enforcement on the NiFi side , then we should completely disassociate this property from SMTPServer or have some other property to eliminate the confusion. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417168#comment-15417168 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74416389 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -135,29 +89,17 @@ .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() +static final PropertyDescriptor SMTP_MAXIMUM_MSG_SIZE = new PropertyDescriptor.Builder() --- End diff -- Is SMTP_MAXIMUM_SIZE being enforced? I've set it to 512 B and ended up with a message of 1KB? Note that setMaxMessageSize has no effective role in dropping messages, instead all it does is to configure the EHLO response: ``` $ telnet 0 2525 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 localhost ESMTP Apache NiFi EHLO . 250-localhost 250-8BITMIME 250-SIZE 512 250 Ok ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417145#comment-15417145 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74414087 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416445#comment-15416445 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74364045 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java --- @@ -13,307 +13,174 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; +import static org.junit.Assert.assertTrue; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + import org.apache.commons.mail.Email; import org.apache.commons.mail.EmailException; import org.apache.commons.mail.SimpleEmail; -import org.apache.nifi.processor.ProcessContext; -import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.remote.io.socket.NetworkUtils; +import org.apache.nifi.ssl.SSLContextService; import org.apache.nifi.ssl.StandardSSLContextService; -import org.apache.nifi.util.MockFlowFile; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; - -import org.apache.nifi.ssl.SSLContextService; - -import org.junit.Assert; +import org.junit.After; +import org.junit.Before; import org.junit.Test; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; - public class TestListenSMTP { -@Test(timeout=15000) -public void ValidEmailTls() throws Exception { -boolean[] failed = {false}; -ListenSMTP listenSmtp = new ListenSMTP(); -final TestRunner runner = TestRunners.newTestRunner(listenSmtp); - -runner.setProperty(ListenSMTP.SMTP_PORT, "0"); -runner.setProperty(ListenSMTP.SMTP_HOSTNAME, "bermudatriangle"); -runner.setProperty(ListenSMTP.SMTP_MAXIMUM_CONNECTIONS, "3"); -runner.setProperty(ListenSMTP.SMTP_TIMEOUT, "10 seconds"); - -// Setup the SSL Context -final SSLContextService sslContextService = new StandardSSLContextService(); -runner.addControllerService("ssl-context", sslContextService); -runner.setProperty(sslContextService, StandardSSLContextService.TRUSTSTORE, "src/test/resources/localhost-ts.jks"); -runner.setProperty(sslContextService, StandardSSLContextService.TRUSTSTORE_PASSWORD, "localtest"); -runner.setProperty(sslContextService, StandardSSLContextService.TRUSTSTORE_TYPE, "JKS"); -runner.setProperty(sslContextService, StandardSSLContextService.KEYSTORE, "src/test/resources/localhost-ks.jks"); -runner.setProperty(sslContextService, StandardSSLContextService.KEYSTORE_PASSWORD, "localtest"); -runner.setProperty(sslContextService, StandardSSLContextService.KEYSTORE_TYPE, "JKS"); -runner.enableControllerService(sslContextService); - -// and add the SSL context to the runner -runner.setProperty(ListenSMTP.SSL_CONTEXT_SERVICE, "ssl-context"); -runner.setProperty(ListenSMTP.CLIENT_AUTH, SSLContextService.ClientAuth.NONE.name()); - +private ScheduledExecutorService executor; +/** + * + */ +@Before +public void before() { +this.executor = Executors.newScheduledThreadPool(2); +} -final ProcessSessionFactory processSessionFactory = runner.getProcessSessionFactory(); -final ProcessContext context = runner.getProcessContext(); - -// NOTE: This test routine uses the same strategy used by TestListenAndPutSyslog -// where listenSmtp method calls are used to allow the processor to be started using -// port "0" without triggering a violation of PORT_VALIDATOR - -listenSmtp.onScheduled(context); -listenSmtp.initializeSMTPServer(context); - -final int port = listenSmtp.getPort(); - -try { -final Thread clientThread = new Thread(new Runnable() { -@Override -public void run() { -try { - - -System.setProperty("mail.smtp.ssl.trust", "*"); -System.setProperty("javax.net.ssl.keyStore", "src/test/resources/localhost-ks.jks"); -
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416429#comment-15416429 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74363521 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override -protected Collection customValidate(final ValidationContext validationContext) { -final List results = new ArrayList<>(); +static final Relationship REL_SUCCESS = new Relationship.Builder() +.name("success") +.description("All new messages will be routed as FlowFiles to this relationship") +.build(); -final String clientAuth = validationContext.getProperty(CLIENT_AUTH).getValue(); -final SSLContextService sslContextService = validationContext.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); +private final static List propertyDescriptors; -if (sslContextService != null && StringUtils.isBlank(clientAuth)) { -results.add(new ValidationResult.Builder() -.explanation("Client Auth must be provided when using TLS/SSL") -.valid(false).subject("Client Auth").build()); -} +private final static Set relationships; -return results; +static { +List _propertyDescriptors = new ArrayList<>(); +_propertyDescriptors.add(SMTP_PORT); +_propertyDescriptors.add(SMTP_MAXIMUM_CONNECTIONS); +_propertyDescriptors.add(SMTP_TIMEOUT); +_propertyDescriptors.add(SMTP_MAXIMUM_MSG_SIZE); +_propertyDescriptors.add(SSL_CONTEXT_SERVICE); +_propertyDescriptors.add(CLIENT_AUTH); +propertyDescriptors = Collections.unmodifiableList(_propertyDescriptors); +Set _relationships = new HashSet<>(); +_relationships.add(REL_SUCCESS); +relationships = Collections.unmodifiableSet(_relationships); } +private volatile SMTPServer smtp; -public static final Relationship REL_SUCCESS = new Relationship.Builder() -.name("success") -.description("Extraction was successful") -.build(); +private volatile SmtpConsumer smtpConsumer; -private Set relationships; -private List propertyDescriptors; -private volatile LinkedBlockingQueue incomingMessages; +/** + * + */ +@Override +public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException { +ProcessSession processSession = sessionFactory.createSession(); +if (this.smtp == null) { +this.setupSmtpIfNecessary(context, processSession); +} + +if (this.smtpConsumer.hasMessage()) { +try { +/* + * Will consume incoming message directly from the wire and into + * FlowFile/Content repository before exiting. This essentially + * limits any potential data loss by allowing SMTPServer thread + * to actually commit NiFi session if all good. However in the + * event of exception, such exception will be propagated back to + * the email sender via "undeliverable message" allowing such + * user to re-send the message + */ +this.smtpConsumer.consumeUsing((inputDataStream) -> { +FlowFile flowFile = processSession.create(); +AtomicInteger size = new AtomicInteger(); +flowFile = processSession.write(flowFile, new OutputStreamCallback() { +@Override +public void process(final
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416420#comment-15416420 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74363226 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") --- End diff -- Got it > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416410#comment-15416410 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362934 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") --- End diff -- Perhaps I am not fully in line with that due to not fully understanding it, but if it's only used for "display" I am ok with putting it back in. Please confirm > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416411#comment-15416411 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362947 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override --- End diff -- Will put it back > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416413#comment-15416413 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362949 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416409#comment-15416409 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362870 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416403#comment-15416403 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362705 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override --- End diff -- Sorry not used to post comments. But yes, custom validator. :-) > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416398#comment-15416398 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362612 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416394#comment-15416394 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362408 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override -protected Collection customValidate(final ValidationContext validationContext) { -final List results = new ArrayList<>(); +static final Relationship REL_SUCCESS = new Relationship.Builder() +.name("success") +.description("All new messages will be routed as FlowFiles to this relationship") +.build(); -final String clientAuth = validationContext.getProperty(CLIENT_AUTH).getValue(); -final SSLContextService sslContextService = validationContext.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); +private final static List propertyDescriptors; -if (sslContextService != null && StringUtils.isBlank(clientAuth)) { -results.add(new ValidationResult.Builder() -.explanation("Client Auth must be provided when using TLS/SSL") -.valid(false).subject("Client Auth").build()); -} +private final static Set relationships; -return results; +static { +List _propertyDescriptors = new ArrayList<>(); +_propertyDescriptors.add(SMTP_PORT); +_propertyDescriptors.add(SMTP_MAXIMUM_CONNECTIONS); +_propertyDescriptors.add(SMTP_TIMEOUT); +_propertyDescriptors.add(SMTP_MAXIMUM_MSG_SIZE); +_propertyDescriptors.add(SSL_CONTEXT_SERVICE); +_propertyDescriptors.add(CLIENT_AUTH); +propertyDescriptors = Collections.unmodifiableList(_propertyDescriptors); +Set _relationships = new HashSet<>(); +_relationships.add(REL_SUCCESS); +relationships = Collections.unmodifiableSet(_relationships); } +private volatile SMTPServer smtp; -public static final Relationship REL_SUCCESS = new Relationship.Builder() -.name("success") -.description("Extraction was successful") -.build(); +private volatile SmtpConsumer smtpConsumer; -private Set relationships; -private List propertyDescriptors; -private volatile LinkedBlockingQueue incomingMessages; +/** + * + */ +@Override +public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException { +ProcessSession processSession = sessionFactory.createSession(); +if (this.smtp == null) { +this.setupSmtpIfNecessary(context, processSession); +} + +if (this.smtpConsumer.hasMessage()) { +try { +/* + * Will consume incoming message directly from the wire and into + * FlowFile/Content repository before exiting. This essentially + * limits any potential data loss by allowing SMTPServer thread + * to actually commit NiFi session if all good. However in the + * event of exception, such exception will be propagated back to + * the email sender via "undeliverable message" allowing such + * user to re-send the message + */ +this.smtpConsumer.consumeUsing((inputDataStream) -> { +FlowFile flowFile = processSession.create(); +AtomicInteger size = new AtomicInteger(); +flowFile = processSession.write(flowFile, new OutputStreamCallback() { +@Override +public void process(final
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416384#comment-15416384 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74362012 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override -protected Collection customValidate(final ValidationContext validationContext) { -final List results = new ArrayList<>(); +static final Relationship REL_SUCCESS = new Relationship.Builder() +.name("success") +.description("All new messages will be routed as FlowFiles to this relationship") +.build(); -final String clientAuth = validationContext.getProperty(CLIENT_AUTH).getValue(); -final SSLContextService sslContextService = validationContext.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); +private final static List propertyDescriptors; -if (sslContextService != null && StringUtils.isBlank(clientAuth)) { -results.add(new ValidationResult.Builder() -.explanation("Client Auth must be provided when using TLS/SSL") -.valid(false).subject("Client Auth").build()); -} +private final static Set relationships; -return results; +static { +List _propertyDescriptors = new ArrayList<>(); +_propertyDescriptors.add(SMTP_PORT); +_propertyDescriptors.add(SMTP_MAXIMUM_CONNECTIONS); +_propertyDescriptors.add(SMTP_TIMEOUT); +_propertyDescriptors.add(SMTP_MAXIMUM_MSG_SIZE); +_propertyDescriptors.add(SSL_CONTEXT_SERVICE); +_propertyDescriptors.add(CLIENT_AUTH); +propertyDescriptors = Collections.unmodifiableList(_propertyDescriptors); +Set _relationships = new HashSet<>(); +_relationships.add(REL_SUCCESS); +relationships = Collections.unmodifiableSet(_relationships); } +private volatile SMTPServer smtp; -public static final Relationship REL_SUCCESS = new Relationship.Builder() -.name("success") -.description("Extraction was successful") -.build(); +private volatile SmtpConsumer smtpConsumer; -private Set relationships; -private List propertyDescriptors; -private volatile LinkedBlockingQueue incomingMessages; +/** + * + */ +@Override +public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException { +ProcessSession processSession = sessionFactory.createSession(); +if (this.smtp == null) { +this.setupSmtpIfNecessary(context, processSession); +} + +if (this.smtpConsumer.hasMessage()) { +try { +/* + * Will consume incoming message directly from the wire and into + * FlowFile/Content repository before exiting. This essentially + * limits any potential data loss by allowing SMTPServer thread + * to actually commit NiFi session if all good. However in the + * event of exception, such exception will be propagated back to + * the email sender via "undeliverable message" allowing such + * user to re-send the message + */ +this.smtpConsumer.consumeUsing((inputDataStream) -> { +FlowFile flowFile = processSession.create(); +AtomicInteger size = new AtomicInteger(); +flowFile = processSession.write(flowFile, new OutputStreamCallback() { +@Override +public void
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416383#comment-15416383 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361967 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override -protected Collection customValidate(final ValidationContext validationContext) { -final List results = new ArrayList<>(); +static final Relationship REL_SUCCESS = new Relationship.Builder() +.name("success") +.description("All new messages will be routed as FlowFiles to this relationship") +.build(); -final String clientAuth = validationContext.getProperty(CLIENT_AUTH).getValue(); -final SSLContextService sslContextService = validationContext.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); +private final static List propertyDescriptors; -if (sslContextService != null && StringUtils.isBlank(clientAuth)) { -results.add(new ValidationResult.Builder() -.explanation("Client Auth must be provided when using TLS/SSL") -.valid(false).subject("Client Auth").build()); -} +private final static Set relationships; -return results; +static { +List _propertyDescriptors = new ArrayList<>(); +_propertyDescriptors.add(SMTP_PORT); +_propertyDescriptors.add(SMTP_MAXIMUM_CONNECTIONS); +_propertyDescriptors.add(SMTP_TIMEOUT); +_propertyDescriptors.add(SMTP_MAXIMUM_MSG_SIZE); +_propertyDescriptors.add(SSL_CONTEXT_SERVICE); +_propertyDescriptors.add(CLIENT_AUTH); +propertyDescriptors = Collections.unmodifiableList(_propertyDescriptors); +Set _relationships = new HashSet<>(); +_relationships.add(REL_SUCCESS); +relationships = Collections.unmodifiableSet(_relationships); } +private volatile SMTPServer smtp; -public static final Relationship REL_SUCCESS = new Relationship.Builder() -.name("success") -.description("Extraction was successful") -.build(); +private volatile SmtpConsumer smtpConsumer; -private Set relationships; -private List propertyDescriptors; -private volatile LinkedBlockingQueue incomingMessages; +/** + * + */ +@Override +public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException { +ProcessSession processSession = sessionFactory.createSession(); +if (this.smtp == null) { +this.setupSmtpIfNecessary(context, processSession); +} + +if (this.smtpConsumer.hasMessage()) { +try { +/* + * Will consume incoming message directly from the wire and into + * FlowFile/Content repository before exiting. This essentially + * limits any potential data loss by allowing SMTPServer thread + * to actually commit NiFi session if all good. However in the + * event of exception, such exception will be propagated back to + * the email sender via "undeliverable message" allowing such + * user to re-send the message + */ +this.smtpConsumer.consumeUsing((inputDataStream) -> { +FlowFile flowFile = processSession.create(); +AtomicInteger size = new AtomicInteger(); +flowFile = processSession.write(flowFile, new OutputStreamCallback() { +@Override +public void process(final
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416381#comment-15416381 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361899 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override -protected Collection customValidate(final ValidationContext validationContext) { -final List results = new ArrayList<>(); +static final Relationship REL_SUCCESS = new Relationship.Builder() +.name("success") +.description("All new messages will be routed as FlowFiles to this relationship") +.build(); -final String clientAuth = validationContext.getProperty(CLIENT_AUTH).getValue(); -final SSLContextService sslContextService = validationContext.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); +private final static List propertyDescriptors; -if (sslContextService != null && StringUtils.isBlank(clientAuth)) { -results.add(new ValidationResult.Builder() -.explanation("Client Auth must be provided when using TLS/SSL") -.valid(false).subject("Client Auth").build()); -} +private final static Set relationships; -return results; +static { +List _propertyDescriptors = new ArrayList<>(); +_propertyDescriptors.add(SMTP_PORT); +_propertyDescriptors.add(SMTP_MAXIMUM_CONNECTIONS); +_propertyDescriptors.add(SMTP_TIMEOUT); +_propertyDescriptors.add(SMTP_MAXIMUM_MSG_SIZE); +_propertyDescriptors.add(SSL_CONTEXT_SERVICE); +_propertyDescriptors.add(CLIENT_AUTH); +propertyDescriptors = Collections.unmodifiableList(_propertyDescriptors); +Set _relationships = new HashSet<>(); +_relationships.add(REL_SUCCESS); +relationships = Collections.unmodifiableSet(_relationships); } +private volatile SMTPServer smtp; -public static final Relationship REL_SUCCESS = new Relationship.Builder() -.name("success") -.description("Extraction was successful") -.build(); +private volatile SmtpConsumer smtpConsumer; -private Set relationships; -private List propertyDescriptors; -private volatile LinkedBlockingQueue incomingMessages; +/** + * + */ +@Override +public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException { +ProcessSession processSession = sessionFactory.createSession(); +if (this.smtp == null) { +this.setupSmtpIfNecessary(context, processSession); +} + +if (this.smtpConsumer.hasMessage()) { +try { +/* + * Will consume incoming message directly from the wire and into + * FlowFile/Content repository before exiting. This essentially + * limits any potential data loss by allowing SMTPServer thread + * to actually commit NiFi session if all good. However in the + * event of exception, such exception will be propagated back to + * the email sender via "undeliverable message" allowing such + * user to re-send the message + */ +this.smtpConsumer.consumeUsing((inputDataStream) -> { +FlowFile flowFile = processSession.create(); +AtomicInteger size = new AtomicInteger(); +flowFile = processSession.write(flowFile, new OutputStreamCallback() { +@Override +public void
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416377#comment-15416377 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361819 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override --- End diff -- I believe you are talking about customValidate() you had there before. I think it was an oversight on my end. Will put it back > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416375#comment-15416375 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361725 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416371#comment-15416371 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361570 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -166,317 +108,158 @@ .identifiesControllerService(SSLContextService.class) .build(); -public static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() +static final PropertyDescriptor CLIENT_AUTH = new PropertyDescriptor.Builder() .name("CLIENT_AUTH") .displayName("Client Auth") .description("The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.") .required(false) .allowableValues(SSLContextService.ClientAuth.NONE.toString(), SSLContextService.ClientAuth.REQUIRED.toString()) .build(); -@Override --- End diff -- Although harmless, this should not be a valid configuration: ![image](https://cloud.githubusercontent.com/assets/3108527/17576962/e5e0414a-5fbb-11e6-9050-9234dc1fe7d1.png) > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416366#comment-15416366 ] ASF GitHub Bot commented on NIFI-2519: -- Github user olegz commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361483 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") --- End diff -- True, so my question is whatever it defaults to is based on the network settings of your machine. Exposing it means I can set it to any name, so I am wondering why would this be important? Don't get me wrong, putting it back is trivial, but I am looking for justification. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416360#comment-15416360 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74361191 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -106,26 +69,17 @@ .addValidator(StandardValidators.PORT_VALIDATOR) .build(); -protected static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder() -.name("SMTP_HOSTNAME") --- End diff -- Without this SubEtha seems to default to localhost ``` $ telnet 10.0.2.15 2525 Trying 10.0.2.15... Connected to 10.0.2.15. Escape character is '^]'. 220 localhost ESMTP Apache NiFi ``` > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416356#comment-15416356 ] Andre commented on NIFI-2519: - [~joewitt] port 25 would require NiFi to be running as root. > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416335#comment-15416335 ] ASF GitHub Bot commented on NIFI-2519: -- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/827#discussion_r74359964 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java --- @@ -13,89 +13,52 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ package org.apache.nifi.processors.email; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import java.io.IOException; -import java.io.InputStream; +import java.io.OutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.commons.lang3.StringUtils; - -import org.subethamail.smtp.server.SMTPServer; - - -import org.apache.nifi.annotation.lifecycle.OnStopped; -import org.apache.nifi.annotation.lifecycle.OnUnscheduled; -import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.processor.DataUnit; +import java.util.concurrent.atomic.AtomicInteger; -import org.apache.nifi.annotation.lifecycle.OnScheduled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessorInitializationContext; -import org.apache.nifi.processor.Relationship; -import org.apache.nifi.processor.util.StandardValidators; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import org.apache.commons.io.IOUtils; import org.apache.nifi.annotation.behavior.InputRequirement; -import org.apache.nifi.annotation.behavior.WritesAttribute; -import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnStopped; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.AbstractSessionFactoryProcessor; +import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.components.ValidationContext; -import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.io.OutputStreamCallback; +import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; - -import org.apache.nifi.processors.email.smtp.event.SmtpEvent; -import org.apache.nifi.processors.email.smtp.handler.SMTPResultCode; -import org.apache.nifi.processors.email.smtp.handler.SMTPMessageHandlerFactory; +import org.subethamail.smtp.server.SMTPServer; @Tags({"listen", "email", "smtp"}) @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN) -@CapabilityDescription("This processor implements a lightweight SMTP server to an arbitrary port, " + -"allowing nifi to listen for incoming email. " + -"" + -"Note this server does not perform any email validation. If direct exposure to the internet is sought," + -"it may be a better idea to use the combination of NiFi and an industrial scale MTA (e.g. Postfix)") -@WritesAttributes({ -@WritesAttribute(attribute = "mime.type", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.helo", description = "The value used during HELO"), -@WritesAttribute(attribute = "smtp.certificates.*.serial", description = "The serial numbers for each of the " + -"certificates used by an TLS peer"), -@WritesAttribute(attribute = "smtp.certificates.*.principal",
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416080#comment-15416080 ] Joseph Witt commented on NIFI-2519: --- [~ozhurakousky] I think listening port should default to 25, no? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416073#comment-15416073 ] Joseph Witt commented on NIFI-2519: --- [~ozhurakousky] Looks like some healthy changes to stabilize the processor and importantly the tests as well which were making the build brittle. I think we'll need to account for the attributes that [~trixpan] had been nicely extracting. I think the other processors that now exist can be used after ListenSMTP instead to capture those attributes if needed but perhaps there are generic attributes we can grab that aren't protocol specific? > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416008#comment-15416008 ] Joseph Witt commented on NIFI-2519: --- btw [~ozhurakousky] can you address these [INFO] --- maven-checkstyle-plugin:2.15:check (check-style) @ nifi-email-processors --- [WARNING] src/main/java/org/apache/nifi/processors/email/ListenSMTP.java[220] (javadoc) NonEmptyAtclauseDescription: At-clause should have a non-empty description. [WARNING] src/main/java/org/apache/nifi/processors/email/ListenSMTP.java[221] (javadoc) NonEmptyAtclauseDescription: At-clause should have a non-empty description. [INFO] [INFO] Reactor Summary: > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (NIFI-2519) TestListenSMTP ValidEmail fails during parallel build
[ https://issues.apache.org/jira/browse/NIFI-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15415337#comment-15415337 ] ASF GitHub Bot commented on NIFI-2519: -- GitHub user olegz opened a pull request: https://github.com/apache/nifi/pull/827 NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/olegz/nifi NIFI-2519 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/827.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #827 commit 3b12c5d62b3ca0f8a968612d87bac86442cdbd00 Author: Oleg ZhurakouskyDate: 2016-08-10T14:19:17Z NIFI-2519 Fixed and refactored ListenSMTP processor - Removed message queueing which could result in data loss - Fixed life-cycle issues that coudl put processor in an unstable state - Fixed PropertyDescriptor translation for Time units and Byte sizes - Fixed broken tests - Added additional tests > TestListenSMTP ValidEmail fails during parallel build > - > > Key: NIFI-2519 > URL: https://issues.apache.org/jira/browse/NIFI-2519 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Joseph Witt >Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > While running a full NiFi parallel build received the following. So there is > some test issue at least that is impacting build stability. > [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 4 source files to > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24] > [deprecation] stop() in Thread has been deprecated > [WARNING] > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24] > [deprecation] stop() in Thread has been deprecated > [INFO] > [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ > nifi-email-processors --- > [INFO] Changes detected - recompiling the module! > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ > nifi-email-processors --- > [INFO] Surefire report directory: > /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports > [INFO] Using configured provider > org.apache.maven.surefire.junit4.JUnit4Provider > --- > T E S T S > --- > Running org.apache.nifi.processors.email.TestListenSMTP > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< > FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP > ValidEmail(org.apache.nifi.processors.email.TestListenSMTP) Time elapsed: > 0.038 sec <<< FAILURE! > java.lang.AssertionError: Sending email failed > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertFalse(Assert.java:64) > at > org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188) > Running org.apache.nifi.processors.email.TestExtractEmailAttachments > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in > org.apache.nifi.processors.email.TestExtractEmailAttachments > Running org.apache.nifi.processors.email.TestExtractEmailHeaders > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - > in org.apache.nifi.processors.email.TestExtractEmailHeaders > Results : > Failed tests: > TestListenSMTP.ValidEmail:188 Sending email failed -- This message was sent by Atlassian JIRA (v6.3.4#6332)