Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1948#discussion_r124613250
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoTest.java
 ---
    @@ -200,4 +201,14 @@ public void testLimit() throws Exception {
             List<MockFlowFile> flowFiles = 
runner.getFlowFilesForRelationship(GetMongo.REL_SUCCESS);
             flowFiles.get(0).assertContentEquals(DOCUMENTS.get(0).toJson());
         }
    +
    +    @Test
    +    public void testResultsPerFlowfile() throws Exception {
    --- End diff --
    
    This integration test assumes that we have 3 documents in the collection. 
In order to have a more accurate unit test, I'd suggest to set the 
``GetMongo.RESULTS_PER_FLOWFILE`` to 2 and then check that the number of flow 
files sent to the SUCCESS relation ship is equal to 2 (one JSON array of two 
elements, and one JSON array of one element).


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to