Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1553#discussion_r103939988
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPutEmail.java
---
@@ -102,13 +91,16 @@ public void testExceptionWhenSending() {
runner.assertQueueEmpty();
runner.assertAllFlowFilesTransferred(PutEmail.REL_FAILURE);
- assertEquals("Expected an attempt to send a single message", 1,
processor.getMessages().size());
+ List<MockFlowFile> results =
runner.getFlowFilesForRelationship(PutEmail.REL_FAILURE);
+ assertEquals("Expected an attempt to send a single message", 1,
results.size());
}
@Test
public void testOutgoingMessage() throws Exception {
// verifies that are set on the outgoing Message correctly
- runner.setProperty(PutEmail.SMTP_HOSTNAME, "smtp-host");
+ runner.setProperty(PutEmail.SMTP_AUTH, "false");
+ runner.setProperty(PutEmail.SMTP_HOSTNAME, "localhost");
+ runner.setProperty(PutEmail.SMTP_PORT, String.valueOf(port));
runner.setProperty(PutEmail.HEADER_XMAILER, "TestingNiFi");
runner.setProperty(PutEmail.FROM, "[email protected]");
--- End diff --
Not sure if that's ok to use legitimate email address as test data
especially as TO/FROM email address. NOt saying it's wrong, simply raising the
question.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---