Skip to content

Commit 7e04728

Browse files
committed
Revert "Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. (Azure#5771)"
This reverts commit 9ccd206.
1 parent e8c7c55 commit 7e04728

3 files changed

Lines changed: 202 additions & 227 deletions

File tree

sdk/core/azure-core/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
### Other Changes
1010

1111
- Updated JSON library to 3.11.3.
12-
- Hide methods on the `RetryPolicy` that are not intended for public use.
1312
- [[#5622]](https://github.com/Azure/azure-sdk-for-cpp/pull/5622) Documentation fix for building the SDK with specific OpenSSL version. (A community contribution, courtesy of _[ByteYue](https://github.com/ByteYue)_)
1413

1514
### Acknowledgments

sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@
3030
#include <utility>
3131
#include <vector>
3232

33-
#if defined(_azure_TESTING_BUILD)
34-
// Define the classes used from tests
35-
namespace Azure { namespace Core { namespace Test {
36-
class RetryPolicyTest;
37-
class RetryLogic;
38-
}}} // namespace Azure::Core::Test
39-
#endif
40-
4133
/**
4234
* A function that should be implemented and linked to the end-user application in order to override
4335
* an HTTP transport implementation provided by Azure SDK with custom implementation.
@@ -371,16 +363,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
371363
/**
372364
* @brief HTTP retry policy.
373365
*/
374-
class RetryPolicy
375-
#if !defined(_azure_TESTING_BUILD)
376-
final
377-
#endif
378-
: public HttpPolicy {
379-
#if defined(_azure_TESTING_BUILD)
380-
// make tests classes friends
381-
friend class Azure::Core::Test::RetryPolicyTest;
382-
friend class Azure::Core::Test::RetryLogic;
383-
#endif
366+
class RetryPolicy : public HttpPolicy {
384367
private:
385368
RetryOptions m_retryOptions;
386369

@@ -415,7 +398,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies {
415398
*/
416399
static int32_t GetRetryCount(Context const& context);
417400

418-
private:
401+
protected:
419402
virtual bool ShouldRetryOnTransportFailure(
420403
RetryOptions const& retryOptions,
421404
int32_t attempt,

0 commit comments

Comments
 (0)