Repository: nifi Updated Branches: refs/heads/master 73e168e95 -> d3367a7dc
nNFI-1618: Updated unit test to use 30,000 FlowFiles to test dropping of swapped out FlowFiles intead of using 210,000. Thiss unit test creates a lot of objects and when reducing the number of FlowFiles generated to 30K instead of 210K, all appears to work okay Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/d3367a7d Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/d3367a7d Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/d3367a7d Branch: refs/heads/master Commit: d3367a7dc306d68eea5f94b3a1479fdb2fea90d3 Parents: 73e168e Author: Mark Payne <[email protected]> Authored: Thu Mar 10 15:27:51 2016 -0500 Committer: Mark Payne <[email protected]> Committed: Thu Mar 10 16:01:29 2016 -0500 ---------------------------------------------------------------------- .../nifi/controller/TestStandardFlowFileQueue.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/d3367a7d/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 fc33d99..2ba1161 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 @@ -442,14 +442,13 @@ public class TestStandardFlowFileQueue { assertNull(flowFile); } - @Test(timeout = 120000) public void testDropSwappedFlowFiles() { - for (int i = 1; i <= 210000; i++) { + for (int i = 1; i <= 30000; i++) { queue.put(new TestFlowFile()); } - assertEquals(20, swapManager.swappedOut.size()); + assertEquals(2, swapManager.swappedOut.size()); final DropFlowFileStatus status = queue.dropFlowFiles("1", "Unit Test"); while (status.getState() != DropFlowFileState.COMPLETE) { try { @@ -461,7 +460,7 @@ public class TestStandardFlowFileQueue { assertEquals(0, queue.size().getObjectCount()); assertEquals(0, queue.size().getByteCount()); assertEquals(0, swapManager.swappedOut.size()); - assertEquals(20, swapManager.swapInCalledCount); + assertEquals(2, swapManager.swapInCalledCount); } @@ -521,10 +520,6 @@ public class TestStandardFlowFileQueue { incompleteSwapFileRecordsToInclude = flowFilesToInclude; } - public void disableIncompleteSwapFileException() { - this.incompleteSwapFileRecordsToInclude = -1; - } - @Override public String swapOut(List<FlowFileRecord> flowFiles, FlowFileQueue flowFileQueue) throws IOException { swapOutCalledCount++;
