Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
shinfan committed Apr 25, 2016
1 parent ddd117d commit 2637346
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ public class LocalPubsubHelper {
private final int port;
private final LocalServiceHelper serviceHelper;


// Local server settings
private static final int DEFAULT_PORT = 8080;
private static final String DEFAULT_HOST = "localhost";
private static final URL EMULATE_URL;
private static final URL EMULATOR_URL;

// GCloud emulator settings
private static final String GCLOUD_CMD_TEXT = "gcloud beta emulators pubsub start";
Expand All @@ -59,7 +58,7 @@ public class LocalPubsubHelper {

static {
try {
EMULATE_URL = new URL("http://storage.googleapis.com/pubsub/tools/" + FILENAME);
EMULATOR_URL = new URL("http://storage.googleapis.com/pubsub/tools/" + FILENAME);
} catch (MalformedURLException ex) {
throw new IllegalStateException(ex);
}
Expand All @@ -77,8 +76,7 @@ public LocalPubsubHelper() {
new GCloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION);
DownloadableEmulatorRunner downloadRunner =
new DownloadableEmulatorRunner(Arrays.asList(BIN_NAME, BIN_CMD_PORT_FLAG + port),
EMULATE_URL,
MD5_CHECKSUM);
EMULATOR_URL, MD5_CHECKSUM);
serviceHelper =
new LocalServiceHelper(Arrays.asList(gcloudRunner, downloadRunner), port);
}
Expand Down Expand Up @@ -123,4 +121,4 @@ public ManagedChannel createChannel() {
.negotiationType(NegotiationType.PLAINTEXT)
.build();
}
}
}

0 comments on commit 2637346

Please sign in to comment.