Skip to content

Commit b23d7cc

Browse files
---
yaml --- r: 17257 b: refs/heads/autosynth-speech c: 6ada222 h: refs/heads/master i: 17255: 8bc5211
1 parent 91c7210 commit b23d7cc

7 files changed

Lines changed: 47 additions & 25 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ refs/heads/autosynth-redis: 0cdb2e47359d51b73763bcea8af3de62aa99119b
141141
refs/heads/autosynth-scheduler: d97f8743ba965c7d5e492c8dc1f51d023104e260
142142
refs/heads/autosynth-securitycenter: 8e95447ccb176c3648880ee0cb926cd1f4065156
143143
refs/heads/autosynth-spanner: 9bff86d057df31e04c76d72865e8e073ac5794fb
144-
refs/heads/autosynth-speech: 878243784f42771467d7cf52bd59e4a6a7950ee9
144+
refs/heads/autosynth-speech: 6ada2226d58a3528d4d818d96e70b5edc83ce936
145145
refs/heads/autosynth-tasks: afc9f4da54964dea5e7f3a9b164db282fc35db5c
146146
refs/heads/autosynth-texttospeech: 0e26ec9b0ed5bbedc038dea32bbb44bae0883668
147147
refs/heads/autosynth-trace: 80c58aa2fb54b0a9c6876f2c21aa8d19cf55962e

branches/autosynth-speech/google-api-grpc/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfig.java

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/autosynth-speech/google-api-grpc/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfigOrBuilder.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/autosynth-speech/google-api-grpc/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/cloud_speech.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ message RecognitionConfig {
215215
// for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
216216
int32 sample_rate_hertz = 2;
217217

218-
// This needs to be set to `true` explicitly and `audio_channel_count` > 1
218+
// This needs to be set to true explicitly and `audio_channel_count` > 1
219219
// to get each channel recognized separately. The recognition result will
220220
// contain a `channel_tag` field to state which channel that result belongs
221221
// to. If this is not true, we will only recognize the first channel. The

branches/autosynth-speech/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ public Object getTransportCode() {
101101
};
102102

103103
// Everything needed to issue an RPC
104-
private final UnaryCallable<MutateRowsRequest, List<MutateRowsResponse>> innerCallable;
105-
private final ApiCallContext callContext;
106-
private MutateRowsRequest currentRequest;
104+
@Nonnull private final UnaryCallable<MutateRowsRequest, List<MutateRowsResponse>> innerCallable;
105+
@Nonnull private final ApiCallContext callContext;
106+
@Nonnull private MutateRowsRequest currentRequest;
107107

108108
// Everything needed to build a retry request
109-
private List<Integer> originalIndexes;
110-
private final Set<StatusCode.Code> retryableCodes;
111-
private final List<FailedMutation> permanentFailures;
109+
@Nullable private List<Integer> originalIndexes;
110+
@Nonnull private final Set<StatusCode.Code> retryableCodes;
111+
@Nullable private final List<FailedMutation> permanentFailures;
112112

113113
// Parent controller
114114
private RetryingFuture<Void> externalFuture;
@@ -135,12 +135,12 @@ public List<MutateRowsResponse> apply(Throwable throwable) {
135135
MutateRowsAttemptCallable(
136136
@Nonnull UnaryCallable<MutateRowsRequest, List<MutateRowsResponse>> innerCallable,
137137
@Nonnull MutateRowsRequest originalRequest,
138-
@Nullable ApiCallContext callContext,
138+
@Nonnull ApiCallContext callContext,
139139
@Nonnull Set<StatusCode.Code> retryableCodes) {
140-
this.innerCallable = Preconditions.checkNotNull(innerCallable);
141-
this.currentRequest = Preconditions.checkNotNull(originalRequest);
142-
this.callContext = callContext;
143-
this.retryableCodes = Preconditions.checkNotNull(retryableCodes);
140+
this.innerCallable = Preconditions.checkNotNull(innerCallable, "innerCallable");
141+
this.currentRequest = Preconditions.checkNotNull(originalRequest, "currentRequest");
142+
this.callContext = Preconditions.checkNotNull(callContext, "callContext");
143+
this.retryableCodes = Preconditions.checkNotNull(retryableCodes, "retryableCodes");
144144

145145
permanentFailures = Lists.newArrayList();
146146
}
@@ -167,10 +167,10 @@ public Void call() {
167167
currentRequest.getEntriesCount() > 0, "Request doesn't have any mutations to send");
168168

169169
// Configure the deadline
170-
ApiCallContext currentCallContext = null;
171-
if (callContext != null) {
170+
ApiCallContext currentCallContext = callContext;
171+
if (!externalFuture.getAttemptSettings().getRpcTimeout().isZero()) {
172172
currentCallContext =
173-
callContext.withTimeout(externalFuture.getAttemptSettings().getRpcTimeout());
173+
currentCallContext.withTimeout(externalFuture.getAttemptSettings().getRpcTimeout());
174174
}
175175

176176
// Handle concurrent cancellation

branches/autosynth-speech/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallableTest.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,28 @@ public void singleEntrySuccessTest() throws Exception {
9292
assertThat(innerCallable.lastRequest).isEqualTo(request);
9393
}
9494

95+
@Test
96+
public void testNoRpcTimeout() {
97+
parentFuture.timedAttemptSettings =
98+
parentFuture.timedAttemptSettings.toBuilder().setRpcTimeout(Duration.ZERO).build();
99+
100+
MutateRowsRequest request =
101+
MutateRowsRequest.newBuilder().addEntries(Entry.getDefaultInstance()).build();
102+
103+
innerCallable.response.add(
104+
MutateRowsResponse.newBuilder()
105+
.addEntries(
106+
MutateRowsResponse.Entry.newBuilder().setIndex(0).setStatus(OK_STATUS_PROTO))
107+
.build());
108+
109+
MutateRowsAttemptCallable attemptCallable =
110+
new MutateRowsAttemptCallable(innerCallable, request, callContext, retryCodes);
111+
attemptCallable.setExternalFuture(parentFuture);
112+
attemptCallable.call();
113+
114+
assertThat(innerCallable.lastContext.getTimeout()).isNull();
115+
}
116+
95117
@Test
96118
public void mixedTest() {
97119
// Setup the request & response
@@ -340,7 +362,7 @@ public ApiFuture<List<MutateRowsResponse>> futureCall(
340362
static class MockRetryingFuture extends AbstractApiFuture<Void> implements RetryingFuture<Void> {
341363
ApiFuture<Void> attemptFuture;
342364

343-
final TimedAttemptSettings timedAttemptSettings;
365+
TimedAttemptSettings timedAttemptSettings;
344366

345367
MockRetryingFuture() {
346368
this(Duration.ofSeconds(5));

branches/autosynth-speech/google-cloud-clients/google-cloud-speech/synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"updateTime": "2019-01-11T08:49:02.528645Z",
2+
"updateTime": "2019-01-10T00:31:48.503770Z",
33
"sources": [
44
{
55
"generator": {
@@ -12,8 +12,8 @@
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "73babd109ac827701c8d957646aa0caa237e23cd",
16-
"internalRef": "228781294"
15+
"sha": "deeb0a29ecc3e746c6fd82f72117360c4ef984cf",
16+
"internalRef": "228610851"
1717
}
1818
}
1919
],

0 commit comments

Comments
 (0)