You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/25 20:37:15 UTC

[GitHub] [nifi] exceptionfactory commented on a diff in pull request #5996: NIFI-9964: Change assertion to prevent TestLookupRecord from failing due to indeterminate map ordering

exceptionfactory commented on code in PR #5996:
URL: https://github.com/apache/nifi/pull/5996#discussion_r858005844


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLookupRecord.java:
##########
@@ -464,7 +464,9 @@ public void testAddFieldsToExistingRecordRouteToSuccess() throws InitializationE
         runner.run();
 
         final MockFlowFile out = runner.getFlowFilesForRelationship(LookupRecord.REL_SUCCESS).get(0);
-        out.assertContentEquals("John Doe,48,soccer,basketball\nJane Doe,47\n");
+        assertTrue(out.getContent().equals("John Doe,48,soccer,basketball\nJane Doe,47\n") 
+            || out.getContent().equals("John Doe,48,basketball,soccer\nJane Doe,47\n"));

Review Comment:
   The test class should continue to use the `assertContentEquals()` method on `MockFlowFile`, as opposed to checking different values.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org