You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2022/08/25 15:35:48 UTC

[nifi-minifi-cpp] 02/03: MINIFICPP-1921 Change test server ports residing in the default range

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

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 8bb5e2a28dcbf048c185857270af6eea351f76a5
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Thu Aug 25 16:55:35 2022 +0200

    MINIFICPP-1921 Change test server ports residing in the default range
    
    Two of the socket tests randomly fails sometimes with the error message
    `bind: Address already in use`: the SecureSocketGetTCPTestEmptyPass and
    the TLSServerSocketSupportedProtocolsTest tests. One of these tests uses
    the port 38776 and the other uses port 38778. The common issue with
    these two ports is that both are in the default linux port range which
    is between 32768 and 60999. If other tests are run beside these two
    tests it is possible that the system assigns these two ports to the
    clients in other tests, thus when we try to initialize the servers, the
    port binding fails. We should change these two ports to be outside the
    default system port range to avoid this issue.
    
    Closes #1406
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .../tests/integration/TLSServerSocketSupportedProtocolsTest.cpp     | 2 +-
 libminifi/test/resources/TestGetTCPSecureEmptyPass.yml              | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/extensions/standard-processors/tests/integration/TLSServerSocketSupportedProtocolsTest.cpp b/extensions/standard-processors/tests/integration/TLSServerSocketSupportedProtocolsTest.cpp
index 41b919798..2b782e727 100644
--- a/extensions/standard-processors/tests/integration/TLSServerSocketSupportedProtocolsTest.cpp
+++ b/extensions/standard-processors/tests/integration/TLSServerSocketSupportedProtocolsTest.cpp
@@ -235,7 +235,7 @@ class TLSServerSocketSupportedProtocolsTest {
  protected:
     void configureSecurity() {
       host_ = minifi::io::Socket::getMyHostName();
-      port_ = "38778";
+      port_ = "28978";
       if (!key_dir_.empty()) {
         configuration_->set(minifi::Configure::nifi_remote_input_secure, "true");
         configuration_->set(minifi::Configure::nifi_security_client_certificate, key_dir_ + "cn.crt.pem");
diff --git a/libminifi/test/resources/TestGetTCPSecureEmptyPass.yml b/libminifi/test/resources/TestGetTCPSecureEmptyPass.yml
index 8d84c2cf8..f9dd9a0d6 100644
--- a/libminifi/test/resources/TestGetTCPSecureEmptyPass.yml
+++ b/libminifi/test/resources/TestGetTCPSecureEmptyPass.yml
@@ -32,7 +32,7 @@ Processors:
       auto-terminated relationships list:
       Properties:
           SSL Context Service: SSLContextService
-          endpoint-list: localhost:38776
+          endpoint-list: localhost:29776
           end-of-message-byte: d
           reconnect-interval: 100ms
           connection-attempt-timeout: 2000
@@ -67,7 +67,7 @@ Connections:
       source name: LogAttribute
       source id: 2438e3c8-015a-1000-79ca-83af40ec1992
       destination name: LogAttribute
-      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992  
+      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992
       source relationship name: success
       max work queue size: 0
       max work queue data size: 1 MB
@@ -88,4 +88,4 @@ Controller Services:
             - value: nifi-cert.pem
 
 Remote Processing Groups:
-    
+