exceptionfactory commented on code in PR #10219:
URL: https://github.com/apache/nifi/pull/10219#discussion_r2292133863
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestAttributesToJSON.java:
##########
@@ -505,10 +504,9 @@ public void testAttributesWithLookALikeJson(String
lookAlikeJson) {
runner.enqueue(ff);
runner.run();
- runner.assertTransferCount(AttributesToJSON.REL_FAILURE, 1);
- runner.assertTransferCount(AttributesToJSON.REL_SUCCESS, 0);
- MockComponentLog logger = runner.getLogger();
-
assertTrue(logger.getErrorMessages().getFirst().getMsg().contains("expecting"));
+ runner.assertTransferCount(AttributesToJSON.REL_SUCCESS, 1);
+ runner.assertTransferCount(AttributesToJSON.REL_FAILURE, 0);
+ // With the fix, invalid JSON is treated as string, so no error
messages expected
Review Comment:
This test change needs to be reverted, it should result in a failure because
the values are not JSON.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]