Skip to content

Commit f288983

Browse files
kolea2sduskis
authored andcommitted
---
yaml --- r: 15673 b: refs/heads/autosynth-datastore c: a29a7cf h: refs/heads/master i: 15671: f354347
1 parent 9fb37dc commit f288983

2 files changed

Lines changed: 2 additions & 45 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ refs/heads/autosynth-bigquerystorage: 14ab055598b943ae3f33f484e9fb1653355d08e7
129129
refs/heads/autosynth-bigtable: 2fbcb15847e0e89e79d6dc07420e28d7dfcea894
130130
refs/heads/autosynth-bigtable-admin: 6379a2bc712f2736c83de0e009b4d26da4fa82ca
131131
refs/heads/autosynth-containeranalysis: 039ca5b8db725c76c16a965ff26b2774322b8ef8
132-
refs/heads/autosynth-datastore: f27d35d5f51ccaf06f12084dbc75f332626ffe56
132+
refs/heads/autosynth-datastore: a29a7cf422a2263b796bc21b2304701d322f0217
133133
refs/heads/autosynth-dialogflow: ebdd13c445b9674ff9ad4601f78d7ecd6f9c3660
134134
refs/heads/autosynth-errorreporting: 3d0566d6bebcc187f148bbed463b5a8e75b1edf6
135135
refs/heads/autosynth-firestore: 92b27fbc8855c9902168695abb0a8f1f433b750b

branches/autosynth-datastore/TESTING.md

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -156,50 +156,7 @@ uses the `RemoteLoggingHelper` to create a metric.
156156

157157
You can test against a Pub/Sub emulator:
158158

159-
1. [Install Cloud SDK](https://cloud.google.com/sdk/downloads)
160-
161-
2. Start the emulator:
162-
```shell
163-
$ gcloud beta emulators pubsub start
164-
```
165-
166-
To determine which host/port the emulator is running on:
167-
```shell
168-
$ gcloud beta emulators pubsub env-init
169-
# Sample output:
170-
# export PUBSUB_EMULATOR_HOST=localhost:8759
171-
```
172-
173-
3. Point your client to the emulator.
174-
```java
175-
String hostport = System.getenv("PUBSUB_EMULATOR_HOST");
176-
ManagedChannel channel = ManagedChannelBuilder.forTarget(hostport).usePlaintext(true).build();
177-
try {
178-
ChannelProvider channelProvider = FixedChannelProvider.create(channel);
179-
CredentialsProvider credentialsProvider = new NoCredentialsProvider();
180-
181-
// Similarly for SubscriptionAdminSettings
182-
TopicAdminClient topicClient = TopicAdminClient.create(
183-
TopicAdminSettings
184-
.defaultBuilder()
185-
.setTransportProvider(
186-
GrpcTransportProvider.newBuilder()
187-
.setChannelProvider(channelProvider)
188-
.build())
189-
.setCredentialsProvider(credentialsProvider)
190-
.build());
191-
192-
// Similarly for Subscriber
193-
Publisher publisher =
194-
Publisher
195-
.defaultBuilder(topicName)
196-
.setChannelProvider(channelProvider)
197-
.setCredentialsProvider(credentialsProvider)
198-
.build();
199-
} finally {
200-
channel.shutdown();
201-
}
202-
```
159+
1. [Set up the emulator](https://cloud.google.com/pubsub/docs/emulator)
203160

204161
### Testing code that uses Redis
205162

0 commit comments

Comments
 (0)