You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/10/14 15:56:59 UTC
nifi git commit: NIFI-730: Added additional testing logic to unit
tests
Repository: nifi
Updated Branches:
refs/heads/NIFI-730 0af1acaaf -> 5867193bc
NIFI-730: Added additional testing logic to unit tests
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/5867193b
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/5867193b
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/5867193b
Branch: refs/heads/NIFI-730
Commit: 5867193bc131962d05985f405ea199840a99feb9
Parents: 0af1aca
Author: Mark Payne <ma...@hotmail.com>
Authored: Wed Oct 14 09:56:52 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Wed Oct 14 09:56:52 2015 -0400
----------------------------------------------------------------------
.../apache/nifi/controller/TestStandardFlowFileQueue.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/5867193b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java
index 4b67d91..7ef5fc8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java
@@ -135,7 +135,14 @@ public class TestStandardFlowFileQueue {
final Set<FlowFileRecord> exp = new HashSet<>();
for (int i = 0; i < 9999; i++) {
- assertNotNull(queue.poll(exp));
+ final FlowFileRecord flowFile = queue.poll(exp);
+ assertNotNull(flowFile);
+ assertEquals(1, queue.getUnacknowledgedQueueSize().getObjectCount());
+ assertEquals(1, queue.getUnacknowledgedQueueSize().getByteCount());
+
+ queue.acknowledge(Collections.singleton(flowFile));
+ assertEquals(0, queue.getUnacknowledgedQueueSize().getObjectCount());
+ assertEquals(0, queue.getUnacknowledgedQueueSize().getByteCount());
}
assertEquals(0, swapManager.swapInCalledCount);