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

valdar pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.8.x by this push:
     new f2d119db8ca fix: [CAMEL-21297]: camel-test-infra-dispatch-router not 
working due to SEGFAULT in running qdrouterd
f2d119db8ca is described below

commit f2d119db8ca2cfdc536314786fa5f1a953249cfe
Author: Andrea Tarocchi <andrea.taroc...@gmail.com>
AuthorDate: Wed Oct 2 11:24:40 2024 +0200

    fix: [CAMEL-21297]: camel-test-infra-dispatch-router not working due to 
SEGFAULT in running qdrouterd
---
 .../router/services/DispatchRouterContainer.java   | 21 ++++++++++++--------
 .../test/infra/dispatch/router/services/Dockerfile | 23 ----------------------
 2 files changed, 13 insertions(+), 31 deletions(-)

diff --git 
a/test-infra/camel-test-infra-dispatch-router/src/test/java/org/apache/camel/test/infra/dispatch/router/services/DispatchRouterContainer.java
 
b/test-infra/camel-test-infra-dispatch-router/src/test/java/org/apache/camel/test/infra/dispatch/router/services/DispatchRouterContainer.java
index f57690b7f46..14edaef96fd 100644
--- 
a/test-infra/camel-test-infra-dispatch-router/src/test/java/org/apache/camel/test/infra/dispatch/router/services/DispatchRouterContainer.java
+++ 
b/test-infra/camel-test-infra-dispatch-router/src/test/java/org/apache/camel/test/infra/dispatch/router/services/DispatchRouterContainer.java
@@ -17,27 +17,32 @@
 
 package org.apache.camel.test.infra.dispatch.router.services;
 
-import org.apache.camel.test.infra.common.TestUtils;
 import org.apache.camel.test.infra.messaging.services.MessagingContainer;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.wait.strategy.Wait;
-import org.testcontainers.images.builder.ImageFromDockerfile;
 
 public class DispatchRouterContainer extends 
GenericContainer<DispatchRouterContainer> implements MessagingContainer {
     private static final int DEFAULT_AMQP_PORT = 5672;
-    private static final String FROM_IMAGE_NAME = "fedora:39";
-    private static final String FROM_IMAGE_ARG = "FROMIMAGE";
+    private static final String IMAGE_NAME = 
"quay.io/interconnectedcloud/qdrouterd:latest";
 
     public DispatchRouterContainer() {
-        super(new ImageFromDockerfile("localhost/qpid-dispatch:camel", false)
-                .withFileFromClasspath("Dockerfile",
-                        
"org/apache/camel/test/infra/dispatch/router/services/Dockerfile")
-                .withBuildArg(FROM_IMAGE_ARG, 
TestUtils.prependHubImageNamePrefixIfNeeded(FROM_IMAGE_NAME)));
+        super(IMAGE_NAME);
 
         withExposedPorts(DEFAULT_AMQP_PORT)
                 .waitingFor(Wait.forListeningPort());
     }
 
+    public DispatchRouterContainer(String imageName, int amqpPort) {
+        super(imageName);
+
+        withExposedPorts(amqpPort)
+                .waitingFor(Wait.forListeningPort());
+    }
+
+    public DispatchRouterContainer(String imageName) {
+        this(imageName, DEFAULT_AMQP_PORT);
+    }
+
     /**
      * Gets the port number used for exchanging messages using the AMQP 
protocol
      *
diff --git 
a/test-infra/camel-test-infra-dispatch-router/src/test/resources/org/apache/camel/test/infra/dispatch/router/services/Dockerfile
 
b/test-infra/camel-test-infra-dispatch-router/src/test/resources/org/apache/camel/test/infra/dispatch/router/services/Dockerfile
deleted file mode 100644
index 8a620f67ca1..00000000000
--- 
a/test-infra/camel-test-infra-dispatch-router/src/test/resources/org/apache/camel/test/infra/dispatch/router/services/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-ARG FROMIMAGE
-FROM $FROMIMAGE
-LABEL maintainer="orpi...@apache.org"
-EXPOSE 5672
-RUN dnf install -y qpid-dispatch-router && dnf clean all
-CMD [ "sh", "-c", "/usr/sbin/qdrouterd" ]
\ No newline at end of file

Reply via email to