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 2026/02/25 14:25:04 UTC

(nifi-minifi-cpp) 03/05: MINIFICPP-2727 Stabilize verify package tests

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

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

commit 71908d19e7256cd1a90805f083ca19292eaa11e2
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Wed Feb 25 14:52:30 2026 +0100

    MINIFICPP-2727 Stabilize verify package tests
    
    - Remove volatile repository test for non-alpine distros, as memory management is different with glibc allocator and checking memory usage in the process does not reflect the actual memory usage of the repository
    - Do not cache errors in HTTP proxy, because transient initial connection errors can cause the proxy to always return the same error code even after establishing the connection
    
    Closes #2117
    
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 .../containers/http_proxy_container.py              |  1 +
 .../tests/features/environment.py                   | 21 +++++++++++++++++++++
 .../tests/features/repository.feature               |  1 +
 3 files changed, 23 insertions(+)

diff --git a/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py b/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
index d07c674ff..54e766fa7 100644
--- a/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
+++ b/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
@@ -34,6 +34,7 @@ class HttpProxy(Container):
                     echo 'acl authenticated proxy_auth REQUIRED' >> /etc/squid/squid.conf && \
                     echo 'http_access allow authenticated' >> /etc/squid/squid.conf && \
                     echo 'http_port {proxy_port}' >> /etc/squid/squid.conf && \
+                    echo 'negative_dns_ttl 0 seconds' >> /etc/squid/squid.conf && \
                     echo 'max_filedescriptors 1024' >> /etc/squid/squid.conf
                 """.format(base_image='ubuntu/squid:5.2-22.04_beta', proxy_username='admin', proxy_password='test101',
                            proxy_port='3128'))
diff --git a/extensions/standard-processors/tests/features/environment.py b/extensions/standard-processors/tests/features/environment.py
index e2908d510..1edb297a3 100644
--- a/extensions/standard-processors/tests/features/environment.py
+++ b/extensions/standard-processors/tests/features/environment.py
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 import platform
+import docker
 from minifi_test_framework.core.hooks import common_before_scenario
 from minifi_test_framework.core.hooks import common_after_scenario
 
@@ -28,8 +29,28 @@ def before_feature(context, feature):
             feature.skip("This feature is only x86/x64 compatible")
 
 
+def is_minifi_image_alpine_based(context):
+    client: docker.DockerClient = docker.from_env()
+    container = client.containers.create(
+        image=context.minifi_container_image,
+        command=['cat', '/etc/os-release'],
+    )
+    try:
+        container.start()
+        result = container.logs()
+        container.remove(force=True)
+    except docker.errors.APIError:
+        container.remove(force=True)
+        return False
+
+    return "alpine" in result.decode('utf-8').lower()
+
+
 def before_scenario(context, scenario):
     common_before_scenario(context, scenario)
+    if "ALPINE_ONLY" in scenario.tags:
+        if not is_minifi_image_alpine_based(context):
+            scenario.skip("This scenario is only compatible with Alpine-based Minifi images")
 
 
 def after_scenario(context, scenario):
diff --git a/extensions/standard-processors/tests/features/repository.feature b/extensions/standard-processors/tests/features/repository.feature
index 5cc8c6949..6c1bdc948 100644
--- a/extensions/standard-processors/tests/features/repository.feature
+++ b/extensions/standard-processors/tests/features/repository.feature
@@ -16,6 +16,7 @@
 @CORE
 Feature: Flow file and content repositories work as expected
 
+  @ALPINE_ONLY
   Scenario: Flow file content is removed from memory when terminated when using Volatile Content Repository
     Given a GenerateFlowFile processor with the "File Size" property set to "20 MB"
     And the scheduling period of the GenerateFlowFile processor is set to "1 sec"