[ 
https://issues.apache.org/jira/browse/NIFI-9381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450587#comment-17450587
 ] 

ASF subversion and git services commented on NIFI-9381:
-------------------------------------------------------

Commit 8171ecb2c1f9d2ea56f330dafd1df6e100f15413 in nifi's branch 
refs/heads/main from Duan
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8171ecb ]

NIFI-9381 Updated CompositeUserGroupProviderTestBase with LinkedHashMap

- Replaced HashMap with LinkedHashMap to avoid potential non-deterministic 
results for user group properties

This closes #5524

Signed-off-by: David Handermann <[email protected]>


> Test Does not pass due to NonDex
> --------------------------------
>
>                 Key: NIFI-9381
>                 URL: https://issues.apache.org/jira/browse/NIFI-9381
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Registry
>    Affects Versions: 1.14.0
>         Environment: openjdk version "1.8.0_292";
> OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10);
> OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode);
> Apache Maven 3.6.0;
> Docker version 20.10.8
>            Reporter: Xuheng Duan
>            Priority: Trivial
>         Attachments: NonDex_log_1.txt
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The test 
> *org.apache.nifi.authorization.CompositeUserGroupProviderTest.testMultipleProvidersWithCollaboratingUserGroupProvider*
>  passed using normal maven-test, but showed Non-deterministic behavior under 
> NonDex([https://github.com/TestingResearchIllinois/NonDex)] and thus failed. 
> Some of the error messages are:
> {code:java}
> [ERROR] Failures: 
> [ERROR]   
> CompositeUserGroupProviderTest.testMultipleProvidersWithCollaboratingUserGroupProvider:173->
> CompositeUserGroupProviderTestBase.testUserGroupProviderTwo:122 expected:<1> 
> but was:<2>
> {code}
> and after some probing, I found the output from the test is not deterministic:
> {code:java}
> [ERROR] Failures: 
> [ERROR]   
> CompositeUserGroupProviderTest.testMultipleProvidersWithCollaboratingUserGroupProvider:174
>  expected:<1> but was:<[user-identifier-4, user-identifier-1]>
> {code}
> I am not sure what caused the change of 
> {_}userGroupProvider.getGroup(GROUP_2_IDENTIFIER).getUsers(){_}. More details 
> of the test can be found in the attachment. 
>  
> Steps to reproduce the failure:
> Install Nondex([https://github.com/TestingResearchIllinois/NonDex)] in the 
> environment. 
> Then cd to nifi repository, and run the following:
> {code:java}
> // Some comments here
> MODULE=nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization-providers
> TEST=org.apache.nifi.authorization.CompositeUserGroupProviderTest#testMultipleProvidersWithCollaboratingUserGroupProvider
> NonDexLog=NonDex_test_1.log
> mvn install -pl "$MODULE" -am -DskipTests
> mvn -pl "$MODULE" test -Dtest="$TEST"
> mvn -pl "$MODULE" edu.illinois:nondex-maven-plugin:1.1.2:nondex 
> -Dtest="$TEST" -DnondexRuns=10  -Denforcer.skip -Ddependency-check.skip | tee 
> "$NonDexLog"
> {code}
> Test results will be saved in the log file under nifi root directory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to