Skip to content

Commit

Permalink
issue42 Remove references to coordinator endpoints from the LRAClent API
Browse files Browse the repository at this point in the history
Signed-off-by: xstefank <[email protected]>
  • Loading branch information
xstefank committed Dec 13, 2018
1 parent a8fdbb4 commit 8dd5adb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,14 @@ public interface LRAClient {
String LRA_HTTP_RECOVERY_HEADER = "Long-Running-Action-Recovery";

/**
* Key for looking up the config property that specifies which host a
* coordinator is running on
* The config property that specifies a URL exposed for LRA orchestration and management
*/
String LRA_COORDINATOR_HOST_KEY = "lra.http.host";

/**
* Key for looking up the config property that specifies which port a
* coordinator is running on
*/
String LRA_COORDINATOR_PORT_KEY = "lra.http.port";

/**
* Key for looking up the config property that specifies which JAX-RS path a
* coordinator is running on
*/
String LRA_COORDINATOR_PATH_KEY = "lra.coordinator.path";

/**
* Key for looking up the config property that specifies which JAX-RS path a
* recovery coordinator is running on
*/
String LRA_RECOVERY_HOST_KEY = "lra.http.recovery.host";

/**
* Key for looking up the config property that specifies which JAX-RS path a
* recovery coordinator is running on
*/
String LRA_RECOVERY_PORT_KEY = "lra.http.recovery.port";

String LRA_HTTP_URL = "lra.http.url";

/**
* Key for looking up the config property that specifies which JAX-RS path a
* recovery coordinator is running on
* The config property that specifies a URL exposed for the LRA recovery semantics
*/
String LRA_RECOVERY_PATH_KEY = "lra.coordinator.recovery.path";
String LRA_RECOVERY_URL= "lra.http.recovery.url";

/**
* Explicitly dispose of all resources. After this call the instance may no
Expand Down
11 changes: 2 additions & 9 deletions tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
import java.util.List;
import java.util.stream.IntStream;

import static org.eclipse.microprofile.lra.client.LRAClient.LRA_COORDINATOR_HOST_KEY;
import static org.eclipse.microprofile.lra.client.LRAClient.LRA_COORDINATOR_PORT_KEY;
import static org.eclipse.microprofile.lra.client.LRAClient.LRA_RECOVERY_PATH_KEY;
import static org.eclipse.microprofile.lra.client.LRAClient.LRA_RECOVERY_URL;
import static org.eclipse.microprofile.lra.tck.participant.api.ActivityController.ACCEPT_WORK;
import static org.eclipse.microprofile.lra.tck.participant.api.ActivityController.ACTIVITIES_PATH;

Expand Down Expand Up @@ -121,13 +119,8 @@ private static void initTck(LRAClient lraClient) {
}

int servicePort = Integer.getInteger("service.http.port", TEST_SWARM_PORT);
// TODO issue 42 will be removing these endpoint references
String rcHost = System.getProperty(LRA_COORDINATOR_HOST_KEY, "localhost");
String rcPath = System.getProperty(LRA_RECOVERY_PATH_KEY, "lra-recovery-coordinator");
int rcPort = Integer.getInteger(LRA_COORDINATOR_PORT_KEY, COORDINATOR_SWARM_PORT);

micrserviceBaseUrl = new URL(String.format("http://localhost:%d", servicePort));
rcBaseUrl = new URL(String.format("http://%s:%d/%s", rcHost, rcPort, rcPath));
rcBaseUrl = new URL(System.getProperty(LRA_RECOVERY_URL, "http://localhost:8080"));

msClient = ClientBuilder.newClient();
rcClient = ClientBuilder.newClient();
Expand Down

0 comments on commit 8dd5adb

Please sign in to comment.