Skip to content

Commit

Permalink
Review issue
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
  • Loading branch information
danielkec committed Oct 2, 2024
1 parent fdbb643 commit 5c5b93b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public class TestLraCoordinator {
CoordinatorLocatorService coordinatorLocator) {
this.serverCdiExtension = serverCdiExtension;
this.coordinatorService = CoordinatorService.builder()
.url(this::getUrl)
.url(this::coordinatorUri)
.config(config.get(CoordinatorService.CONFIG_PREFIX))
.build();
coordinatorLocator.overrideCoordinatorUriSupplier(this::getUrl);
coordinatorLocator.overrideCoordinatorUriSupplier(this::coordinatorUri);
}

@Produces
Expand All @@ -78,7 +78,7 @@ HttpService coordinatorService() {
*
* @return coordinator url
*/
public URI getUrl() {
public URI coordinatorUri() {
return URI.create("http://localhost:" + awaitPort() + CONTEXT_PATH);
}

Expand All @@ -92,8 +92,8 @@ public Lra lra(String lraId) {
if (lraId == null) {
return null;
}
if (lraId.startsWith(getUrl() + "/")) {
return coordinatorService.lra(lraId.substring(getUrl().toString().length() + 1));
if (lraId.startsWith(coordinatorUri() + "/")) {
return coordinatorService.lra(lraId.substring(coordinatorUri().toString().length() + 1));
}
return coordinatorService.lra(lraId);
}
Expand Down

0 comments on commit 5c5b93b

Please sign in to comment.