From 4ee8bb1dfc30b6f1b531ebd4550d1b08460b2cc5 Mon Sep 17 00:00:00 2001 From: xstefank Date: Wed, 12 Dec 2018 16:02:46 +0100 Subject: [PATCH] issue42 Remove references to coordinator endpoints from the LRAClent API Signed-off-by: xstefank --- .../microprofile/lra/client/LRAClient.java | 38 ++++--------------- .../microprofile/lra/tck/TckTests.java | 11 +----- 2 files changed, 9 insertions(+), 40 deletions(-) diff --git a/api/src/main/java/org/eclipse/microprofile/lra/client/LRAClient.java b/api/src/main/java/org/eclipse/microprofile/lra/client/LRAClient.java index 53f9e87f..b3342281 100644 --- a/api/src/main/java/org/eclipse/microprofile/lra/client/LRAClient.java +++ b/api/src/main/java/org/eclipse/microprofile/lra/client/LRAClient.java @@ -44,40 +44,16 @@ 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. An implementation is not required to make use of this property. */ - 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. An implementation is not required to make use of this property. */ - 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 diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java index 2e8761b8..4d724b35 100644 --- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java +++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java @@ -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; @@ -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();