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

Update unit tests for distributor push native histograms #6020

Merged

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Jun 17, 2024

What this PR does:

Follow up of #5986.

Update unit tests for distributor push and query native histograms.

Which issue(s) this PR fixes:
Fixes #

Checklist

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

@@ -3481,7 +3658,7 @@ func TestDistributor_Push_Relabel(t *testing.T) {
})

// Push the series to the distributor
req := mockWriteRequest(tc.inputSeries, 1, 1)
req := mockWriteRequest(tc.inputSeries, 1, 1, false)
Copy link
Member

Choose a reason for hiding this comment

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

Should we test for the histogram=true case as well?

Copy link
Contributor Author

@yeya24 yeya24 Jun 21, 2024

Choose a reason for hiding this comment

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

I didn't change it because relabel logic ideally has nothing to do with whether native histogram data or not.
But yeah I can cover histogram test case too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated: fixed in latest commit

@yeya24 yeya24 force-pushed the update-distributor-test-native-histograms branch from 5646767 to dd9b196 Compare June 21, 2024 21:42
@yeya24 yeya24 changed the title Update unit tests for distributor push and query native histograms Update unit tests for distributor push native histograms Jun 21, 2024
@@ -620,7 +706,7 @@ func TestPush_QuorumError(t *testing.T) {
ingesters[2].failResp.Store(httpgrpc.Errorf(429, "Throttling"))

for i := 0; i < numberOfWrites; i++ {
request := makeWriteRequest(0, 30, 20)
request := makeWriteRequest(0, 30, 20, 0)
Copy link
Member

Choose a reason for hiding this comment

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

Should we test for the native histogram case here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know if it is nencessary since histogram doesn't change anything related to quorum. And we mock response here anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the test to include histogram writes.

Signed-off-by: Ben Ye <[email protected]>
@yeya24
Copy link
Contributor Author

yeya24 commented Jun 24, 2024

Thanks, merging now

@yeya24 yeya24 merged commit 05ac741 into cortexproject:master Jun 24, 2024
16 checks passed
@yeya24 yeya24 deleted the update-distributor-test-native-histograms branch June 24, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants