-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Do not use uncontrolled randomisation in tests where it is not necessary. The retry tests in the httpjson and cel packages were using a randomised 5xx HTTP status code to trigger the retry behaviour of the the go-retryablehttp package. This has the unfortunate consequence of causing 2% of test runs to fail. The reason for this is given in the go-retryablehttp documentation[1]: Mainly, if an error is returned by the client (connection errors, etc.), or if a 500-range response code is received (except 501), then a retry is invoked after a wait period. Since the package is already tested, and is documented to accept all 5xx status codes except 501 to cause a retry, just use 500. [1]https://pkg.go.dev/github.com/hashicorp/[email protected]#section-readme (cherry picked from commit 794b832) Co-authored-by: Dan Kortschak <[email protected]>
- Loading branch information
1 parent
330535f
commit efd7de1
Showing
3 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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