You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gax/src/gax.ts
-14Lines changed: 0 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -333,20 +333,6 @@ export function convertRetryOptions(
333
333
// if a user provided retry AND retryRequestOptions at call time, throw an error
334
334
// otherwise, convert supported parameters
335
335
if(!gaxStreamingRetries){
336
-
if(options.retry){
337
-
warn(
338
-
'legacy_streaming_retry_behavior',
339
-
'Legacy streaming retry behavior will not honor settings passed at call time or via client configuration. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will be set to true by default in future releases.',
340
-
'DeprecationWarning'
341
-
);
342
-
}
343
-
if(options.retryRequestOptions){
344
-
warn(
345
-
'legacy_streaming_retry_request_behavior',
346
-
'Legacy streaming retry behavior will not honor retryRequestOptions passed at call time. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will convert retryRequestOptions to retry parameters by default in future releases.',
'Legacy streaming retry behavior will not honor settings passed at call time or via client configuration. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will be set to true by default in future releases.',
303
-
'DeprecationWarning'
304
-
)
305
-
);
306
296
});
307
297
308
298
it('emit response when stream received metadata event',done=>{
'Legacy streaming retry behavior will not honor settings passed at call time or via client configuration. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will be set to true by default in future releases.',
684
-
'DeprecationWarning'
685
-
)
686
-
);
687
667
});
688
668
it('emit parsed GoogleError when new retries are enabled',done=>{
689
669
consterrorInfoObj={
@@ -1982,101 +1962,6 @@ describe('warns/errors about server streaming retry behavior when gaxStreamingRe
1982
1962
sinon.restore();
1983
1963
});
1984
1964
1985
-
it('throws a warning when retryRequestOptions are passed',done=>{
false// ensure we are NOT opted into the new retry behavior
2006
-
);
2007
-
constpassedRetryRequestOptions={
2008
-
objectMode: false,
2009
-
retries: 1,
2010
-
maxRetryDelay: 70,
2011
-
retryDelayMultiplier: 3,
2012
-
totalTimeout: 650,
2013
-
noResponseRetries: 3,
2014
-
currentRetryAttempt: 0,
2015
-
shouldRetryFn: functionalwaysRetry(){
2016
-
returntrue;
2017
-
},
2018
-
};
2019
-
// make the call with both options passed at call time
2020
-
apiCall(
2021
-
{},
2022
-
{
2023
-
retryRequestOptions: passedRetryRequestOptions,
2024
-
}
2025
-
);
2026
-
assert.strictEqual(warnStub.callCount,1);
2027
-
assert(
2028
-
warnStub.calledWith(
2029
-
'legacy_streaming_retry_request_behavior',
2030
-
'Legacy streaming retry behavior will not honor retryRequestOptions passed at call time. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will convert retryRequestOptions to retry parameters by default in future releases.',
2031
-
'DeprecationWarning'
2032
-
)
2033
-
);
2034
-
});
2035
-
it('throws a warning when retry options are passed',done=>{
false// ensure we are NOT opted into the new retry behavior
2055
-
);
2056
-
2057
-
// make the call with both options passed at call time
2058
-
apiCall(
2059
-
{},
2060
-
{
2061
-
retry: gax.createRetryOptions([1],{
2062
-
initialRetryDelayMillis: 300,
2063
-
retryDelayMultiplier: 1.2,
2064
-
maxRetryDelayMillis: 1000,
2065
-
rpcTimeoutMultiplier: 1.5,
2066
-
maxRpcTimeoutMillis: 3000,
2067
-
totalTimeoutMillis: 4500,
2068
-
}),
2069
-
}
2070
-
);
2071
-
assert.strictEqual(warnStub.callCount,1);
2072
-
assert(
2073
-
warnStub.calledWith(
2074
-
'legacy_streaming_retry_behavior',
2075
-
'Legacy streaming retry behavior will not honor settings passed at call time or via client configuration. Please set gaxStreamingRetries to true to utilize passed retry settings. gaxStreamingRetries behavior will be set to true by default in future releases.',
2076
-
'DeprecationWarning'
2077
-
)
2078
-
);
2079
-
});
2080
1965
it('throws no warnings when when no retry options are passed',done=>{
2081
1966
constwarnStub=sinon.stub(warnings,'warn');
2082
1967
// this exists to help resolve createApiCall
@@ -2103,56 +1988,6 @@ describe('warns/errors about server streaming retry behavior when gaxStreamingRe
2103
1988
apiCall({},{});
2104
1989
assert.strictEqual(warnStub.callCount,0);
2105
1990
});
2106
-
it('throws two warnings when when retry and retryRequestoptions are passed',done=>{
0 commit comments