|
4 | 4 | */ |
5 | 5 |
|
6 | 6 | #include <aws/testing/AwsCppSdkGTestSuite.h> |
| 7 | +#include <aws/testing/platform/PlatformTesting.h> |
7 | 8 | #include <aws/core/client/AWSError.h> |
8 | 9 | #include <aws/core/client/CoreErrors.h> |
9 | 10 | #include <aws/core/client/RetryStrategy.h> |
@@ -55,6 +56,7 @@ class TestThrottleBasedQuotaContainer : public RetryQuotaContainer |
55 | 56 |
|
56 | 57 | class RetryBehaviorTest : public Aws::Testing::AwsCppSdkGTestSuite |
57 | 58 | { |
| 59 | + Aws::Environment::EnvironmentRAII m_env{{{"AWS_NEW_RETRIES_2026", "true"}}}; |
58 | 60 | }; |
59 | 61 |
|
60 | 62 | static AWSError<CoreErrors> MakeTransientError() |
@@ -376,8 +378,13 @@ TEST_F(RetryBehaviorTest, InvalidRetryAfterFallsBack) |
376 | 378 | ASSERT_LE(delay, 50); |
377 | 379 | } |
378 | 380 |
|
| 381 | +class RetryBehaviorLegacyTest : public Aws::Testing::AwsCppSdkGTestSuite |
| 382 | +{ |
| 383 | + Aws::Environment::EnvironmentRAII m_env{{{"AWS_NEW_RETRIES_2026", ""}}}; |
| 384 | +}; |
| 385 | + |
379 | 386 | // Verify legacy behavior unchanged when gate is off (old constructors) |
380 | | -TEST_F(RetryBehaviorTest, LegacyBehaviorUnchanged) |
| 387 | +TEST_F(RetryBehaviorLegacyTest, LegacyBehaviorUnchanged) |
381 | 388 | { |
382 | 389 | StandardRetryStrategy strategy(3); |
383 | 390 |
|
@@ -412,7 +419,7 @@ TEST_F(RetryBehaviorTest, ThrottleBasedClassification) |
412 | 419 | } |
413 | 420 |
|
414 | 421 | // Verify legacy classification: REQUEST_TIMEOUT costs 10, others cost 5 |
415 | | -TEST_F(RetryBehaviorTest, LegacyClassification) |
| 422 | +TEST_F(RetryBehaviorLegacyTest, LegacyClassification) |
416 | 423 | { |
417 | 424 | DefaultRetryQuotaContainer quota; |
418 | 425 |
|
|
0 commit comments