From 6bc34ff43eca99a95472d3d4e014cc062fdef200 Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Fri, 6 May 2016 15:06:30 -0700 Subject: [PATCH] Update LocalPubsubHelper to be compatible with beta emulators. (#992) --- .../com/google/cloud/pubsub/testing/LocalPubsubHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubsubHelper.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubsubHelper.java index 88acb46101b1..afdba1c135ed 100644 --- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubsubHelper.java +++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubsubHelper.java @@ -71,7 +71,7 @@ public class LocalPubsubHelper { public LocalPubsubHelper() { port = LocalServiceHelper.findAvailablePort(DEFAULT_PORT); List gcloudCommand = new ArrayList<>(Arrays.asList(GCLOUD_CMD_TEXT.split(" "))); - gcloudCommand.add(GCLOUD_CMD_PORT_FLAG + port); + gcloudCommand.add(GCLOUD_CMD_PORT_FLAG + "localhost:" + port); GCloudEmulatorRunner gcloudRunner = new GCloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION); DownloadableEmulatorRunner downloadRunner = @@ -89,7 +89,7 @@ public LocalPubsubHelper() { * @throws IOException */ public void start() throws IOException, InterruptedException { - String blockUntilOutput = Integer.toString(port); + String blockUntilOutput = "Server started, listening on " + port; serviceHelper.start(blockUntilOutput); }