AzureADAuthenticator includes retry logic for all oAuth token providers that are implemented in ABFS Driver. Where as CustomTokenProvider failures end up in retry from the ABFS Driver REST request invoking layer which is not expected.
Ideally custom token provider implementation should include retry logic too. Raising PR to stop retries getting triggered from the REST op layer due to exceptions from custom token provider.
As custom token providers might have had benefited by the unintentional retry happening, have retained a linear retry to trigger getAccessToken. The retry count is made configurable.
The fix is tested with mock failures of a CustomTokenProvider by modifying a existing testcase that injects this scenario.
The modified testcase previously used to test a new config introduced to control the number of request retries done by exponential retry policy. New test class TestExponentialRetryPolicy is added to ensure that tests for this older config is present.
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.