Skip to content

Commit

Permalink
[WFLY-19450] refactoring the test
Browse files Browse the repository at this point in the history
  • Loading branch information
sudeshnas93 committed Jun 25, 2024
1 parent ceb7046 commit 29c9d82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.jboss.as.quickstarts.mail;

import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.junit.Test;

import java.io.IOException;
Expand All @@ -36,11 +35,8 @@
*/
public class BasicRuntimeIT {

private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/mail";

@Test
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
HttpGet httpGet = new HttpGet(getServerHost());
final HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(getServerHost()))
.GET()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class TestUtils {
static final String DEFAULT_SERVER_HOST = "http://localhost:8080/mail";
static final String API_PATH = "/home.jsf";
static final String MAINPAGE_PATH = "/home.jsf";

static String getServerHost() {
String serverHost = System.getenv("SERVER_HOST");
Expand All @@ -27,6 +27,6 @@ static String getServerHost() {
if (serverHost == null) {
serverHost = DEFAULT_SERVER_HOST;
}
return serverHost + API_PATH;
return serverHost + MAINPAGE_PATH;
}
}

0 comments on commit 29c9d82

Please sign in to comment.