Skip to content
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

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

RomanZavodskikh
Copy link
Contributor

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

Splitted from #2888 to reduce amount of code merged in the single time.

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>
@RomanZavodskikh RomanZavodskikh added the minor no risk changes, for example new filters label Feb 14, 2024
rnd *rand.Rand
}

type RoundTripperUnhealthyHostParams struct {
Copy link
Member

@szuecs szuecs Feb 14, 2024

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 {
Copy link
Member

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

@szuecs
Copy link
Member

szuecs commented Feb 14, 2024

👍

1 similar comment
@RomanZavodskikh
Copy link
Contributor Author

👍

@RomanZavodskikh
Copy link
Contributor Author

I will address Sandor's comments in #2888 or other subsequent PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants