-
Notifications
You must be signed in to change notification settings - Fork 812
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
Update unit tests for distributor push native histograms #6020
Conversation
pkg/distributor/distributor_test.go
Outdated
@@ -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) |
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.
Should we test for the histogram=true case as well?
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.
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
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.
Updated: fixed in latest commit
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
5646767
to
dd9b196
Compare
pkg/distributor/distributor_test.go
Outdated
@@ -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) |
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.
Should we test for the native histogram case here as well?
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.
I don't know if it is nencessary since histogram doesn't change anything related to quorum. And we mock response here anyway.
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.
Updated the test to include histogram writes.
Signed-off-by: Ben Ye <[email protected]>
Thanks, merging now |
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
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]