Skip to content

Commit

Permalink
Fix apache#2285 upgrade to use the lasest narayana lra-coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfeng committed Jun 25, 2021
1 parent ed5cc24 commit ee23599
Showing 1 changed file with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
public class LraTestResource implements QuarkusTestResourceLifecycleManager {

private static final Integer LRA_PORT = AvailablePortFinder.getNextAvailable();
// TODO: Use a newer lra-coordinator
// https://github.com/apache/camel-quarkus/issues/2285
private static final String LRA_IMAGE = "jbosstm/lra-coordinator:5.9.3.Final";
private static final String LRA_IMAGE = "jbosstm/lra-coordinator:5.12.0.Final";

private GenericContainer container;
private String hostname;
Expand All @@ -43,27 +41,17 @@ public Map<String, String> start() {
hostname = "localhost";
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("host")
.withCommand(
"java",
"-jar",
"/deployments/lra-coordinator-swarm.jar",
"-Djava.net.preferIPv4Stack=true",
"-Dswarm.http.port=" + LRA_PORT)
.waitingFor(Wait.forLogMessage(".*WFSWARM99999.*", 1));
.withEnv("JAVA_OPTS", "-Dquarkus.http.port=" + LRA_PORT)
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = LRA_PORT;
} else {
hostname = "host.docker.internal";
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("bridge")
.withExposedPorts(LRA_PORT)
.withCommand(
"java",
"-jar",
"/deployments/lra-coordinator-swarm.jar",
"-Djava.net.preferIPv4Stack=true",
"-Dswarm.http.port=" + LRA_PORT)
.waitingFor(Wait.forLogMessage(".*WFSWARM99999.*", 1));
.withEnv("JAVA_OPTS", "-Dquarkus.http.port=" + LRA_PORT)
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = container.getMappedPort(LRA_PORT);
}
Expand Down

0 comments on commit ee23599

Please sign in to comment.