-
Notifications
You must be signed in to change notification settings - Fork 352
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
Created mock tests for ongoing Passive Health Check feature #2938
Conversation
There are three tests with the similar idea: 1) send a lot of requests 2) check for failure rate to be as expected 3) let endpointregistry update stats related to PHC 4) send a lot of requests 5) check for failure rate to be as expected after stats update The cases are: + single healthy endpoint + multiple healthy endpoints + multiple healthy + single unhealthy endpoint Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
rnd *rand.Rand | ||
} | ||
|
||
type RoundTripperUnhealthyHostParams struct { |
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.
RoundTripperUnhealthyHostOptions?
return rt.inner.RoundTrip(r) | ||
} | ||
|
||
func newRoundTripperUnhealthyHost(o *RoundTripperUnhealthyHostParams) func(r http.RoundTripper) http.RoundTripper { |
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.
o *RoundTripperUnhealthyHostParams
why o
if it's Params
? So either rename or change o->p
👍 |
1 similar comment
👍 |
I will address Sandor's comments in #2888 or other subsequent PR. |
There are three tests with the similar idea:
The cases are:
Splitted from #2888 to reduce amount of code merged in the single time.