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

ringhash: improve test coverage #6072

Closed
easwars opened this issue Mar 2, 2023 · 9 comments · Fixed by #7271 or #7334
Closed

ringhash: improve test coverage #6072

easwars opened this issue Mar 2, 2023 · 9 comments · Fixed by #7271 or #7334
Assignees

Comments

@easwars
Copy link
Contributor

easwars commented Mar 2, 2023

I just noticed that the amount of tests that we have for the ringhash LB policy is woefully short compared to what C-core and Java have. We should add more tests, which exercise different scenarios.

C-core tests are here: https://github.com/grpc/grpc/blob/master/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc
Java tests are here: https://github.com/grpc/grpc-java/blob/master/xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java

@avinilcodes
Copy link

I would like to contribute, can you assign this to me.

@dfawley
Copy link
Member

dfawley commented Sep 26, 2023

@avinilcodes - I can gladly assign this to you, but right now it seems very ambiguous. Do you think you'll be able to assess the tests in our repo and compare it to the tests in the other repos, or would you need us to help identify the missing things more concretely?

@shashank-priyadarshi
Copy link

Hi @dfawley , I can work on this.

@ginayeh
Copy link
Contributor

ginayeh commented Oct 3, 2023

@shashank-priyadarshi as @dfawley mentioned earlier, do you think you'll be able to assess the tests in our repo and compare it to the tests in other repos, or would you need us help identify the missing things more concretely?

@arvindbr8
Copy link
Member

@shashank-priyadarshi / @avinilcodes -- friendly ping! We are almost half way through "Hacktoberfest" 😄.

@shashank-priyadarshi
Copy link

shashank-priyadarshi commented Oct 17, 2023

Sorry, been busy with work lately, couldn't squeeze this in! Hopefull about the weekend!

@atollena
Copy link
Collaborator

This lines up well with some work I have in progress on improving ring hash, and such tests would actually help me, so I'm assigning to me.

@easwars
Copy link
Contributor Author

easwars commented Jun 12, 2024

There are more tests to be written :)

@easwars easwars reopened this Jun 12, 2024
atollena added a commit to atollena/grpc-go that referenced this issue Jun 19, 2024
Follow up to grpc#7271 to fix
grpc#6072.

This adds a dozen more end to end tests.

There are tests that I did not port, specifically:

- TestRingHash_TransientFailureSkipToAvailableReady was flaky when I ported it,
so I removed it while investigating.

- TestRingHash_SwitchToLowerPriorityAndThenBack was also flaky, I also removed
it while investigating.

- TestRingHash_ContinuesConnectingWithoutPicksOneSubchannelAtATime, I'm not sure
we implement this behavior, and if we do, it's not working the same way as in
c-core, where the order of subchannel connection attempts is based on the
resolver address order rather than the ring order.

I will follow up with fixes for each one of the remaining tests.
atollena added a commit to atollena/grpc-go that referenced this issue Jun 19, 2024
Follow up to grpc#7271 to fix
grpc#6072.

This adds a dozen more end to end tests.

There are tests that I did not port, specifically:

- TestRingHash_TransientFailureSkipToAvailableReady was flaky when I ported it,
so I removed it while investigating.

- TestRingHash_SwitchToLowerPriorityAndThenBack was also flaky, I also removed
it while investigating.

- TestRingHash_ContinuesConnectingWithoutPicksOneSubchannelAtATime, I'm not sure
we implement this behavior, and if we do, it's not working the same way as in
c-core, where the order of subchannel connection attempts is based on the
resolver address order rather than the ring order.

I will follow up with fixes for each one of the remaining tests.
atollena added a commit to atollena/grpc-go that referenced this issue Jun 19, 2024
Follow up to grpc#7271 to fix
grpc#6072.

This adds a dozen more end to end tests.

There are tests that I did not port, specifically:

- TestRingHash_TransientFailureSkipToAvailableReady was flaky when I ported it,
so I removed it while investigating.

- TestRingHash_SwitchToLowerPriorityAndThenBack was also flaky, I also removed
it while investigating.

- TestRingHash_ContinuesConnectingWithoutPicksOneSubchannelAtATime, I'm not sure
we implement this behavior, and if we do, it's not working the same way as in
c-core, where the order of subchannel connection attempts is based on the
resolver address order rather than the ring order.

I will follow up with fixes for each one of the remaining tests.
@atollena
Copy link
Collaborator

This work uncovered #7363.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
9 participants