greyp9 commented on code in PR #10743:
URL: https://github.com/apache/nifi/pull/10743#discussion_r2692086199


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenUDP.java:
##########
@@ -213,6 +215,7 @@ private void verifyFlowFiles(List<MockFlowFile> 
mockFlowFiles) {
             flowFile.assertContentEquals("This is message " + (i + 1));
             assertEquals(String.valueOf(port), 
flowFile.getAttribute(ListenUDP.UDP_PORT_ATTR));
             
assertTrue(StringUtils.isNotEmpty(flowFile.getAttribute(ListenUDP.UDP_SENDER_ATTR)));
+            assertEquals(5, 
flowFile.getAttribute(ListenUDP.UDP_SENDER_PORT_ATTR).length());  // send port 
expected to be in ephemeral range

Review Comment:
   > On some machines, the ephemeral range starts with `1024`. Instead of 
checking the length, using `StringUtils.isNumeric()` seems like a better check.
   
   That's definitely better; thanks!  



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to