Skip to content

Commit 6bc34ff

Browse files
shinfanmziccard
authored andcommitted
Update LocalPubsubHelper to be compatible with beta emulators. (#992)
1 parent 7857986 commit 6bc34ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubsubHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class LocalPubsubHelper {
7171
public LocalPubsubHelper() {
7272
port = LocalServiceHelper.findAvailablePort(DEFAULT_PORT);
7373
List<String> gcloudCommand = new ArrayList<>(Arrays.asList(GCLOUD_CMD_TEXT.split(" ")));
74-
gcloudCommand.add(GCLOUD_CMD_PORT_FLAG + port);
74+
gcloudCommand.add(GCLOUD_CMD_PORT_FLAG + "localhost:" + port);
7575
GCloudEmulatorRunner gcloudRunner =
7676
new GCloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION);
7777
DownloadableEmulatorRunner downloadRunner =
@@ -89,7 +89,7 @@ public LocalPubsubHelper() {
8989
* @throws IOException
9090
*/
9191
public void start() throws IOException, InterruptedException {
92-
String blockUntilOutput = Integer.toString(port);
92+
String blockUntilOutput = "Server started, listening on " + port;
9393
serviceHelper.start(blockUntilOutput);
9494
}
9595

0 commit comments

Comments
 (0)