-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add retries to tests relying on Http bin to improve test resiliency. #5692
Conversation
// is still flagged as shutdown. | ||
auto session | ||
= std::make_unique<Azure::Core::Http::CurlSession>(req, std::move(connection), options); | ||
GTEST_LOG_(INFO) << "forceConnectionClosed test iteration " << i << "."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these appear to be essentially identical. Is it possible to centralize this logic in a single function that encapsulates the retry logic and includes the test-specific behavior in a lambda?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to centralize the logic, but I prefer tests to be very simple/isolated and find the readability of lambdas a bit cognitively burdensome. If I can't find a simpler way to achieve that, will fall back to the lambda approach.
@@ -23,6 +23,10 @@ namespace Azure { namespace Core { namespace Test { | |||
namespace _detail { | |||
constexpr static const char AzureSdkHttpbinServerSchema[] = "https"; | |||
constexpr static const char AzureSdkHttpbinServer[] = "azuresdkforcpp.azurewebsites.net"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this logic be moved into a single source rather than being defined in two different places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a good suggestion. I will see how to remove the existing duplication here.
Hi @ahsonkhan. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @ahsonkhan. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing |
Address a class of intermittent test failures due to transient failures caused by the reliability of http bin.
The issues below have more detail on the intermittent nature of the tests.
Fixes:
#5652
#5006
#4634
#5493
Similar fix to #5537