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

    https://github.com/apache/nifi/pull/2180#discussion_r164200676
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoTest.java
 ---
    @@ -135,15 +135,15 @@ public void testValidators() {
             // invalid projection
             runner.setVariable("projection", "{a: x,y,z}");
             runner.setProperty(GetMongo.QUERY, "{a: 1}");
    -        runner.setProperty(GetMongo.PROJECTION, "${projection}");
    +        runner.setProperty(GetMongo.PROJECTION, "{a: z}");
    --- End diff --
    
    The test was reporting a false positive for me until I made that change. It 
seemed to think that x,y,z was a valid projection, but when I changed it to a:z 
it recognized it was invalid. Since none of that is valid JSON, I'm not even 
sure why any of it is working instead of the Mongo client API throwing an 
exception on parsing it.


---

Reply via email to