Skip to content

Commit

Permalink
Addressing reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chamikaramj committed Oct 10, 2023
1 parent dcfe3d6 commit 0834573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sdks/java/transform-service/docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ DEPENDENCIES_VOLUME=$DEPENDENCIES_VOLUME

# A requirements file with either of the following
# * PyPi packages
# Locally available packages relative to the directory provided to
# DEPENDENCIES_VOLUME.
# * Locally available packages relative to the directory provided to
# DEPENDENCIES_VOLUME.
PYTHON_REQUIREMENTS_FILE_NAME=$PYTHON_REQUIREMENTS_FILE_NAME

GOOGLE_APPLICATION_CREDENTIALS_FILE_NAME=application_default_credentials.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ private void waitForAllServicesToBeReady() throws TimeoutException {
try {
String url = endpoint.getUrl();
int portIndex = url.lastIndexOf(":");
int port = portIndex > 0 ? Integer.parseInt(url.substring(portIndex + 1)) : 80;
String host = portIndex > 0 ? url.substring(0, portIndex) : url;
if (portIndex <= 0) {
throw new RuntimeException(
"Expected the endpoint to be of the form <host>:<port> but received " + url);
}
int port = Integer.parseInt(url.substring(portIndex + 1));
String host = url.substring(0, portIndex);
new Socket(host, port).close();
// Current service is up. Checking the next one.
continue outer;
Expand Down

0 comments on commit 0834573

Please sign in to comment.