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

Token ranges: test different instance states. #441

Merged
merged 2 commits into from
Nov 24, 2023
Merged

Conversation

pstibrany
Copy link
Member

What this PR does:

This PR modifies TestCheckingOfKeyOwnership test to randomize instance states.

Checklist

  • Tests updated
  • [na] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that we are now not testing the steady-state of all ingesters ready.
If you agree, maybe running the test once with all-ready and once with randomized states would be more thorough?

@@ -195,6 +200,12 @@ func TestCheckingOfKeyOwnership(t *testing.T) {

// Generate ring
ringDesc := &Desc{Ingesters: generateRingInstances(gen, instancesPerZone*numZones, numZones, numTokens)}
// Switch states of some ingesters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feedback similar to Bryan's one. The comment says "some ingesters" but I read the code as "all ingesters".

@pstibrany
Copy link
Member Author

I worry that we are now not testing the steady-state of all ingesters ready. If you agree, maybe running the test once with all-ready and once with randomized states would be more thorough?

Good point. I've added test without states randomization too.

@pstibrany pstibrany enabled auto-merge (squash) November 24, 2023 11:21
@pstibrany pstibrany merged commit b5ae864 into main Nov 24, 2023
3 checks passed
@pstibrany pstibrany deleted the test-instance-states branch November 24, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants