NIFI-730: Added additional testing logic to unit tests

This commit is contained in:
Mark Payne 2015-10-14 09:56:52 -04:00
parent 0af1acaafa
commit 5867193bc1
1 changed files with 8 additions and 1 deletions

View File

@ -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);