This is an automated email from the ASF dual-hosted git repository.
zhfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 53d7727bb5 [LRA] Fix test when running with DOCKER_HOST (#6042)
53d7727bb5 is described below
commit 53d7727bb544e73c7af9748084c3e5a874d0c1b8
Author: Andrej Vaňo <[email protected]>
AuthorDate: Fri Apr 26 06:00:55 2024 +0200
[LRA] Fix test when running with DOCKER_HOST (#6042)
---
.../camel/quarkus/component/lra/it/LraTestResource.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
index 49e1e5be05..dcfbefbe92 100644
---
a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
+++
b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
@@ -58,7 +58,18 @@ public class LraTestResource implements
QuarkusTestResourceLifecycleManager {
lraPort = container.getMappedPort(LRA_PORT);
}
+ // If the test runs with a remote docker, it needs to know the IP
of the machine where the test app runs
+ if (System.getenv("DOCKER_HOST") != null) {
+ hostname = System.getProperty("lra.appNode.ip");
+ if (hostname == null) {
+ throw new RuntimeException(
+ "You need to supply application node IP when
running LRA test with a remote docker instance using lra.appNode.ip property");
+ }
+ }
+
return CollectionHelper.mapOf(
+ // In case of remote docker, expose the endpoint at
0.0.0.0, as the default is "localhost" only
+ "quarkus.http.host", "0.0.0.0",
"camel.lra.coordinator-url",
String.format("http://%s:%d", container.getHost(),
lraPort),
"camel.lra.local-participant-url",