This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 8171ecb  NIFI-9381 Updated CompositeUserGroupProviderTestBase with 
LinkedHashMap
8171ecb is described below

commit 8171ecb2c1f9d2ea56f330dafd1df6e100f15413
Author: Duan <[email protected]>
AuthorDate: Tue Nov 16 07:19:14 2021 -0600

    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]>
---
 .../nifi/authorization/CompositeUserGroupProviderTestBase.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization-providers/src/test/java/org/apache/nifi/authorization/CompositeUserGroupProviderTestBase.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization-providers/src/test/java/org/apache/nifi/authorization/CompositeUserGroupProviderTestBase.java
index 6eb650f..6c60bb4 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization-providers/src/test/java/org/apache/nifi/authorization/CompositeUserGroupProviderTestBase.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization-providers/src/test/java/org/apache/nifi/authorization/CompositeUserGroupProviderTestBase.java
@@ -21,7 +21,7 @@ import org.apache.nifi.components.PropertyValue;
 import org.apache.nifi.parameter.ParameterLookup;
 import org.junit.Assert;
 
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.function.Consumer;
@@ -179,7 +179,7 @@ public class CompositeUserGroupProviderTestBase {
 
     protected void mockProperties(final AuthorizerConfigurationContext 
configurationContext) {
         when(configurationContext.getProperties()).then((invocation) -> {
-            final Map<String, String> properties = new HashMap<>();
+            final Map<String, String> properties = new LinkedHashMap<>();
 
             int i = 1;
             while (true) {
@@ -235,4 +235,4 @@ public class CompositeUserGroupProviderTestBase {
 
         return compositeUserGroupProvider;
     }
-}
\ No newline at end of file
+}

Reply via email to