try (GoogleAdsServiceClient googleAdsService = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
ServerStream<SearchGoogleAdsStreamResponse> stream = googleAdsService
.searchStreamCallable().call(searchGoogleAdsStreamRequest);
int count = 0;
for (SearchGoogleAdsStreamResponse response : stream) { // where the exception throws out
for (GoogleAdsRow googleAdsRow : response.getResultsList()) {
JsonObject line = new JsonObject();
AdGroupAd adGroupAd = googleAdsRow.getAdGroupAd();
I tried to override the deadline by specifying a GrpcCallContext on the api call as following, but still doesn't work
ServerStream<SearchGoogleAdsStreamResponse> stream = googleAdsService
.searchStreamCallable()
.call(searchGoogleAdsStreamRequest,
GrpcCallContext.createDefault()
.withCallOptions(
CallOptions.DEFAULT.withDeadline(Deadline.after(5, TimeUnit.HOURS))));