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
This PR adds a missing break at the HTTP request re-try loop.
It is a minor bug, but it can result in double re-try requests where one should be enough. Also, talking about corner cases, there is a small possibility of the first re-try request be successful, and the second fails, which could result in false error.
This PR added the break and also Test cases that cover such scenarios to ensure that now we have it all covered.
DISCLAIMER
This PR has fixed the log issue caused by the misplaced String.format attributes at cd5fe4b; merged in the context of #4846 and correctly reverted at #4861.
To make sure all is good I re-build with the fix, and also executed all unit tests.
Additionally, All the 19 tests at RedfishClientTest have passed after commit b9dd504.
1. RedfishClientTest.validateAddressAndPrepareForUrlTestIpv4 1.02 s passed
2. RedfishClientTest.validateAddressAndPrepareForUrlTestIpv6 10 ms passed
3. RedfishClientTest.retryHttpRequestExceptionAfterOneRetry 2.02 s passed
4. RedfishClientTest.validateAddressAndPrepareForUrlTestExpect 20 ms passed
5. RedfishClientTest.retryHttpRequestSuccessAtTheSecondRetry 4.02 s passed
6. RedfishClientTest.buildRequestUrlTestHttpsComputerSystemReset 61 ms passed
7. RedfishClientTest.validateAddressAndPrepareForUrlTestDomainName 1 ms passed
8. RedfishClientTest.buildRequestUrlTestGetSystemId 1 ms passed
9. RedfishClientTest.getSystemIdTestHttpStatusNotOk 53 ms passed
10. RedfishClientTest.buildRequestUrlTestComputerSystemReset 1 ms passed
11. RedfishClientTest.getSystemPowerStateTest 4 ms passed
12. RedfishClientTest.getSystemIdTest 2 ms passed
13. RedfishClientTest.retryHttpRequestNoException 6.01 s passed
14. RedfishClientTest.buildRequestUrlTestHttpsGetPowerState 3 ms passed
15. RedfishClientTest.getSystemPowerStateTestHttpStatusNotOk 10 ms passed
16. RedfishClientTest.buildRequestUrlTestGetPowerState 4 ms passed
17. RedfishClientTest.buildRequestUrlTestHttpsGetSystemId 3 ms passed
18. RedfishClientTest.retryHttpRequestNoRetries 3 ms passed
19. RedfishClientTest.retryHttpRequestExceptionAfterTwoRetries 4.00 s passed
Types of changes
Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change which adds functionality)
Bug fix (non-breaking change which fixes an issue)
Enhancement (improves an existing feature and functionality)
Cleanup (Code refactoring and cleanup, that may add test cases)
Bug Severity
BLOCKER
Critical
Major
Minor
Trivial
Screenshots (if appropriate):
How Has This Been Tested?
A - Test steps with 4.15.0.0:
connect at the JVM via remote debug
place breakpoints and tail logs
verify that it keeps attempting new HTTP requests even with the previous not failing until it reaches 3 attempts
B - Test this implementation (4.15.1.0-SNAPSHOT):
build packages
update mgmt server
connect on JVM to remote debug
place breakpoints and tail logs
verify that the break indeed works if the HTTP request has not failed
GabrielBrascher
changed the title
Redifsh retry break fixlogformat
Add 'break' at RedifshClient request re-try loop (fixed issue from 4846)
Mar 24, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a missing break at the HTTP request re-try loop.
It is a minor bug, but it can result in double re-try requests where one should be enough. Also, talking about corner cases, there is a small possibility of the first re-try request be successful, and the second fails, which could result in false error.
This PR added the break and also Test cases that cover such scenarios to ensure that now we have it all covered.
DISCLAIMER
This PR has fixed the log issue caused by the misplaced
String.formatattributes at cd5fe4b; merged in the context of #4846 and correctly reverted at #4861.To make sure all is good I re-build with the fix, and also executed all unit tests.
Additionally, All the 19 tests at RedfishClientTest have passed after commit b9dd504.
Types of changes
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
A - Test steps with 4.15.0.0:
B - Test this implementation (4.15.1.0-SNAPSHOT):