From 281ba2f34edafc998960eb65afa3da398a2dbb8e Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 9 Jan 2024 10:54:39 +0000 Subject: [PATCH] Align ejb-txn-remote-call default server host with the others --- .../as/quickstarts/ejb/BasicRuntimeIT.java | 19 +++++++++---------- .../as/quickstarts/ejb/BasicRuntimeIT.java | 9 ++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ejb-txn-remote-call/client/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java b/ejb-txn-remote-call/client/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java index 2469a7114f..c812c147a6 100644 --- a/ejb-txn-remote-call/client/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java +++ b/ejb-txn-remote-call/client/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java @@ -34,8 +34,7 @@ */ public class BasicRuntimeIT { - private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/"; - private static final String DEFAULT_APPLICATION = "client"; + private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/client"; @Test public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException { @@ -46,17 +45,17 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti if (serverHost == null) { serverHost = DEFAULT_SERVER_HOST; } - testEndpoint(serverHost, DEFAULT_APPLICATION,"/remote-outbound-stateless",200); - testEndpoint(serverHost, DEFAULT_APPLICATION,"/remote-outbound-notx-stateless",200); - testEndpoint(serverHost, DEFAULT_APPLICATION,"/direct-stateless",200); - testEndpoint(serverHost, DEFAULT_APPLICATION,"/direct-stateless-http",200); - testEndpoint(serverHost, DEFAULT_APPLICATION,"/remote-outbound-notx-stateful",200); - testEndpoint(serverHost, DEFAULT_APPLICATION,"/remote-outbound-fail-stateless",200); + testEndpoint(serverHost, "/remote-outbound-stateless",200); + testEndpoint(serverHost, "/remote-outbound-notx-stateless",200); + testEndpoint(serverHost, "/direct-stateless",200); + testEndpoint(serverHost, "/direct-stateless-http",200); + testEndpoint(serverHost, "/remote-outbound-notx-stateful",200); + testEndpoint(serverHost, "/remote-outbound-fail-stateless",200); } - private void testEndpoint(String serverHost, String application, String endpoint, int expectedCode) throws URISyntaxException, IOException, InterruptedException { + private void testEndpoint(String serverHost, String endpoint, int expectedCode) throws URISyntaxException, IOException, InterruptedException { final HttpRequest request = HttpRequest.newBuilder() - .uri(new URI(serverHost + application + endpoint)) + .uri(new URI(serverHost + endpoint)) .GET() .build(); final HttpClient client = HttpClient.newBuilder() diff --git a/ejb-txn-remote-call/server/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java b/ejb-txn-remote-call/server/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java index 071ba27f62..a89b0f713f 100644 --- a/ejb-txn-remote-call/server/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java +++ b/ejb-txn-remote-call/server/src/test/java/org/jboss/as/quickstarts/ejb/BasicRuntimeIT.java @@ -34,8 +34,7 @@ */ public class BasicRuntimeIT { - private static final String DEFAULT_SERVER_HOST = "http://localhost:8180/"; - private static final String DEFAULT_APPLICATION = "server"; + private static final String DEFAULT_SERVER_HOST = "http://localhost:8180/server"; @Test public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException { @@ -46,12 +45,12 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti if (serverHost == null) { serverHost = DEFAULT_SERVER_HOST; } - testEndpoint(serverHost, DEFAULT_APPLICATION,"/commits",200); + testEndpoint(serverHost, "/commits",200); } - private void testEndpoint(String serverHost, String application, String endpoint, int expectedCode) throws URISyntaxException, IOException, InterruptedException { + private void testEndpoint(String serverHost, String endpoint, int expectedCode) throws URISyntaxException, IOException, InterruptedException { final HttpRequest request = HttpRequest.newBuilder() - .uri(new URI(serverHost + application + endpoint)) + .uri(new URI(serverHost + endpoint)) .GET() .build(); final HttpClient client = HttpClient.newBuilder()