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 2021/11/22 14:34:44 UTC

[GitHub] [nifi] SpiceOwlf commented on pull request #5524: [NIFI-9381] Test Does not pass due to NonDex

SpiceOwlf commented on pull request #5524:
URL: https://github.com/apache/nifi/pull/5524#issuecomment-975590694


   Here are what I observed:
   While using HashMap, NonDex will complain that `java.lang.AssertionError: expected:<1> but was:<2>`, and the error was cast from `CompositeUserGroupProviderTest.testMultipleProvidersWithConflictingUsers:135->CompositeUserGroupProviderTestBase.testUserGroupProviderTwo:122`
   
   With a little bit more digging, `userGroupProvider.getGroup(GROUP_2_IDENTIFIER).getUsers().size()` is the cause of this error, and  `userGroupProvider.getGroup(GROUP_2_IDENTIFIER).getUsers()` will return `<[user-identifier-4, user-identifier-1]>` or `<[user-identifier-3]>` depending on the random seed NonDex received. Changing HashMap to LinkedHashMap eliminate such random behavior. It ensures that `initCompositeUserGroupProvider` has deterministic order while using `mockProperties`.  Please let me know if my explaination makes sense or not. I will also attach the steps to reproduce this error later. 
   


-- 
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