ASF GitHub Bot commented on NIFI-4827:

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

    --- Diff: 
    @@ -69,6 +70,7 @@
         public void setup() {
             runner = TestRunners.newTestRunner(GetMongo.class);
    +        runner.setProperty(GetMongo.QUERY, "{}");
    --- End diff --
    Does this need to be here? Seems like it might hide the cases when Query is 
empty, which would be the existing behavior. If it's because of the validator, 
then it should accept an empty query as valid since the property is not 
required.  Also, can you add a unit test (or update the existing one) for when 
the Query is empty and there is no incoming flow file (but there is an incoming 
connection)? That would test the other half of the conditions for the exception 
block you added at the top of onTrigger.

> Make GetMongo able to use flowfiles for queries
> -----------------------------------------------
>                 Key: NIFI-4827
>                 URL: https://issues.apache.org/jira/browse/NIFI-4827
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Minor
> GetMongo should be able to retrieve a valid query from the flowfile content 
> or allow the incoming flowfile to provide attributes to power EL statements 
> in the Query configuration field. Allowing the body to be used would allow 
> GetMongo to be used in a much more generic way.

This message was sent by Atlassian JIRA

Reply via email to