You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2021/12/09 18:32:12 UTC

[nifi] branch main updated: NIFI-9417: Update BulletinMergerTest.java

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

mattyb149 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 c1bb0c0  NIFI-9417: Update BulletinMergerTest.java
c1bb0c0 is described below

commit c1bb0c0c3421136b045a66415be9b17947952492
Author: Yiming Li <46...@users.noreply.github.com>
AuthorDate: Wed Nov 10 11:26:51 2021 -0600

    NIFI-9417: Update BulletinMergerTest.java
    
    Signed-off-by: Matthew Burgess <ma...@apache.org>
    
    This closes #5572
---
 .../org/apache/nifi/cluster/manager/BulletinMergerTest.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/manager/BulletinMergerTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/manager/BulletinMergerTest.java
index 1502433..cb0d181 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/manager/BulletinMergerTest.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/manager/BulletinMergerTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -65,7 +65,7 @@ public class BulletinMergerTest {
         final NodeIdentifier node1 = new NodeIdentifier("node-1", "host-1", 8080, "host-1", 19998, null, null, null, false);
         final NodeIdentifier node2 = new NodeIdentifier("node-2", "host-2", 8081, "host-2", 19999, null, null, null, false);
 
-        final Map<NodeIdentifier, List<BulletinEntity>> nodeMap = new HashMap<>();
+        final Map<NodeIdentifier, List<BulletinEntity>> nodeMap = new LinkedHashMap<>();
         nodeMap.put(node1, new ArrayList<>());
         nodeMap.put(node2, new ArrayList<>());
 
@@ -77,10 +77,10 @@ public class BulletinMergerTest {
 
         final List<BulletinEntity> bulletinEntities = BulletinMerger.mergeBulletins(nodeMap, nodeMap.size());
         assertEquals(bulletinEntities.size(), 3);
-        assertTrue(bulletinEntities.contains(copyOfBulletin1));
-        assertEquals(copyOfBulletin1.getNodeAddress(), ALL_NODES_MESSAGE);
+        assertTrue(bulletinEntities.contains(bulletinEntity1));
+        assertEquals(bulletinEntity1.getNodeAddress(), ALL_NODES_MESSAGE);
         assertTrue(bulletinEntities.contains(bulletinEntity2));
         assertTrue(bulletinEntities.contains(unauthorizedBulletin));
     }
 
-}
\ No newline at end of file
+}