You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2015/12/02 05:12:41 UTC
[2/2] nifi git commit: NIFI-1237 Reducing number of messages sent in
testBatching() to be less than size of ListenSyslog's internal queue
NIFI-1237 Reducing number of messages sent in testBatching() to be less than size of ListenSyslog's internal queue
Signed-off-by: joewitt <jo...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/6a8c2dba
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/6a8c2dba
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/6a8c2dba
Branch: refs/heads/master
Commit: 6a8c2dba12ea852d2b43162196adc6587854fbbf
Parents: ff5330d
Author: Bryan Bende <bb...@apache.org>
Authored: Tue Dec 1 21:24:32 2015 -0500
Committer: joewitt <jo...@apache.org>
Committed: Tue Dec 1 22:53:42 2015 -0500
----------------------------------------------------------------------
.../org/apache/nifi/processors/standard/TestListenSyslog.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/6a8c2dba/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java
index d9dc8f0..8fdca7f 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java
@@ -230,7 +230,9 @@ public class TestListenSyslog {
final ProcessContext context = runner.getProcessContext();
proc.onScheduled(context);
- final int numMessages = 20;
+ // the processor has internal blocking queue with capacity 10 so we have to send
+ // less than that since we are sending all messages before the processors ever runs
+ final int numMessages = 5;
final int port = proc.getPort();
Assert.assertTrue(port > 0);
@@ -251,7 +253,7 @@ public class TestListenSyslog {
final String content = new String(flowFile.toByteArray(), StandardCharsets.UTF_8);
final String[] splits = content.split("\\|");
- Assert.assertEquals(20, splits.length);
+ Assert.assertEquals(numMessages, splits.length);
final List<ProvenanceEventRecord> events = runner.getProvenanceEvents();
Assert.assertNotNull(events);