Add custom request timeout support for VWS and CloudRecoService #2823
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Summary
Adds support for configurable request timeouts in both VWS and CloudRecoService APIs. Previously, timeouts were hardcoded to 30 seconds. Now users can specify a custom timeout during client initialization.
Changes
request_timeout_secondsparameter to VWS and CloudRecoService constructors with 30-second defaultTesting
Tests verify that the default timeout is 30 seconds and that custom timeouts can be set and used successfully.
Note
Low Risk
Low risk: keeps the existing 30s default while exposing a new optional timeout knob; behavior changes only for callers that set a custom timeout.
Overview
Adds configurable HTTP request timeouts to both
VWSandCloudRecoServicevia a newrequest_timeout_secondsconstructor parameter (defaulting to the previous hardcoded 30s).Plumbs the timeout through to the underlying
requests.requestcalls (including_target_api_request) and adds tests covering default/custom values plus simulated slow-response timeout/success behavior.Written by Cursor Bugbot for commit a0b073d. This will update automatically on new commits. Configure here.