nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mosermw <...@git.apache.org>
Subject [GitHub] nifi pull request #444: NIFI-1118 adding SplitText features of size limit an...
Date Wed, 01 Jun 2016 20:55:19 GMT
Github user mosermw commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/444#discussion_r65440697
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java
---
    @@ -39,6 +39,303 @@
                 + "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nLastLine\n";
     
         @Test
    +    public void testLastLineExceedsSizeLimit() {
    +        final TestRunner runner = TestRunners.newTestRunner(new SplitText());
    +        runner.setProperty(SplitText.HEADER_LINE_COUNT, "0");
    +        runner.setProperty(SplitText.LINE_SPLIT_COUNT, "2");
    +        runner.setProperty(SplitText.FRAGMENT_MAX_SIZE, "20 B");
    +
    +        runner.enqueue("Line #1\nLine #2\nLine #3\nLong line exceeding limit");
    +        runner.run();
    +
    +        runner.assertTransferCount(SplitText.REL_FAILURE, 0);
    +        runner.assertTransferCount(SplitText.REL_ORIGINAL, 1);
    +        runner.assertTransferCount(SplitText.REL_SPLITS, 3);
    +    }
    --- End diff --
    
    I examined the content of each output FlowFile.  The first and third look fine, but the
second FlowFile had a trailing newline even though the dreaded REMOVE_TRAILING_NEWLINES defaults
to "true".


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message