Repository: nifi Updated Branches: refs/heads/master 0721d9a0e -> 9af61d3a2
NIFI-5332: Fix GetMongoIT test failures This closes #2808 Signed-off-by: Mike Thomsen <mikerthom...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/9af61d3a Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/9af61d3a Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/9af61d3a Branch: refs/heads/master Commit: 9af61d3a2d81f2809eee83694b2ed901ddb72009 Parents: 0721d9a Author: zenfenan <sivaprasanna...@gmail.com> Authored: Sat Jun 23 14:17:58 2018 +0530 Committer: Mike Thomsen <mikerthom...@gmail.com> Committed: Mon Jun 25 20:59:48 2018 -0400 ---------------------------------------------------------------------- .../org/apache/nifi/processors/mongodb/GetMongoIT.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/9af61d3a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java index 71bfc2b..4bb0078 100644 --- a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java +++ b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java @@ -135,7 +135,7 @@ public class GetMongoIT { // invalid projection runner.setVariable("projection", "{a: x,y,z}"); - runner.setProperty(GetMongo.QUERY, "{a: 1}"); + runner.setProperty(GetMongo.QUERY, "{\"a\": 1}"); runner.setProperty(GetMongo.PROJECTION, "{a: z}"); runner.enqueue(new byte[0]); pc = runner.getProcessContext(); @@ -190,7 +190,7 @@ public class GetMongoIT { @Test public void testReadMultipleDocuments() throws Exception { - runner.setProperty(GetMongo.QUERY, "{a: {$exists: true}}"); + runner.setProperty(GetMongo.QUERY, "{\"a\": {\"$exists\": \"true\"}}"); runner.run(); runner.assertAllFlowFilesTransferred(GetMongo.REL_SUCCESS, 3); @@ -202,8 +202,8 @@ public class GetMongoIT { @Test public void testProjection() throws Exception { - runner.setProperty(GetMongo.QUERY, "{a: 1, b: 3}"); - runner.setProperty(GetMongo.PROJECTION, "{_id: 0, a: 1}"); + runner.setProperty(GetMongo.QUERY, "{\"a\": 1, \"b\": 3}"); + runner.setProperty(GetMongo.PROJECTION, "{\"_id\": 0, \"a\": 1}"); runner.run(); runner.assertAllFlowFilesTransferred(GetMongo.REL_SUCCESS, 1); @@ -215,7 +215,7 @@ public class GetMongoIT { @Test public void testSort() throws Exception { runner.setVariable("sort", "{a: -1, b: -1, c: 1}"); - runner.setProperty(GetMongo.QUERY, "{a: {$exists: true}}"); + runner.setProperty(GetMongo.QUERY, "{\"a\": {\"$exists\": \"true\"}}"); runner.setProperty(GetMongo.SORT, "${sort}"); runner.run(); @@ -228,7 +228,7 @@ public class GetMongoIT { @Test public void testLimit() throws Exception { - runner.setProperty(GetMongo.QUERY, "{a: {$exists: true}}"); + runner.setProperty(GetMongo.QUERY, "{\"a\": {\"$exists\": \"true\"}}"); runner.setProperty(GetMongo.LIMIT, "${limit}"); runner.setVariable("limit", "1"); runner.run();