You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2023/05/31 15:54:23 UTC

[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7299: NIFI-11603: Removed NetworkUtils.getAvailableUdpPort, NetworkUtils.ge…

exceptionfactory commented on code in PR #7299:
URL: https://github.com/apache/nifi/pull/7299#discussion_r1211922678


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenUDP.java:
##########
@@ -173,7 +170,7 @@ public void testRunWhenNoEventsAvailable() {
 
     @Test
     public void testWithSendingHostAndPortSameAsSender() throws IOException, InterruptedException {
-        final Integer sendingPort = NetworkUtils.getAvailableUdpPort();
+        final int sendingPort = 27911;

Review Comment:
   Will this hard-coded port result in intermittent failures? Can it be set to `0` for constructing the `DatagramSocket`?



##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenSyslog.java:
##########
@@ -216,6 +216,7 @@ public class ListenSyslog extends AbstractSyslogProcessor {
     private volatile SyslogParser parser;
     private volatile BlockingQueue<ByteArrayMessage> syslogEvents = new LinkedBlockingQueue<>();
     private volatile byte[] messageDemarcatorBytes; //it is only the array reference that is volatile - not the contents.
+    private volatile int listeningPort;

Review Comment:
   This value does not appear to be assigned.



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