Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.8.x] Backport #6045

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.testcontainers.shaded.org.awaitility.Awaitility;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;

@QuarkusTest
@QuarkusTestResource(CxfWssClientTestResource.class)
Expand Down Expand Up @@ -116,7 +115,7 @@ public void testWrongClientNotHanging() {
//always fails because there is no server implementation
createSayHelloWrongClient().sayHelloWrong("Sheldon");
} catch (SOAPFaultException e) {
return "Connection refused".equals(e.getMessage());
return e.getMessage() != null && e.getMessage().toLowerCase().contains("connection refused");
}
//can not happen (client does not work)
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@ public Map<String, String> start() {
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",
Expand Down
Loading