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/11/16 18:14:46 UTC

[GitHub] [nifi] nandorsoma commented on a diff in pull request #6649: NIFI-10785 Allow publishing AMQP message with null header value

nandorsoma commented on code in PR #6649:
URL: https://github.com/apache/nifi/pull/6649#discussion_r1024349399


##########
nifi-nar-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/test/java/org/apache/nifi/amqp/processors/PublishAMQPTest.java:
##########
@@ -134,14 +124,10 @@ public void validateSuccessWithHeaderWithCommaPublishToSuccess() throws Exceptio
 
         final Map<String, Object> headerMap = msg1.getProps().getHeaders();
 
-        final Object foo = headerMap.get("foo");
-        final Object foo2 = headerMap.get("foo2");
-        final Object foo3 = headerMap.get("foo3");
-
-        assertEquals("(bar,bar)", foo.toString());
-        assertEquals("bar2", foo2.toString());
-        assertNull(foo3);
-
+        assertEquals(2, headerMap.size());
+        assertEquals("(bar,bar)", headerMap.get("foo").toString());

Review Comment:
   Good idea, thanks @thenatog! I added a minor modification, though. I'm creating the maps locally because you cannot use the same map for both tests.



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