-
Notifications
You must be signed in to change notification settings - Fork 805
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
Add error case tests for pinot_visibility_store #5746
Conversation
@@ -604,7 +604,7 @@ func createVisibilityMessage( | |||
for key, value := range rawSearchAttributes { | |||
value, err = isTimeStruct(value) | |||
if err != nil { | |||
return nil, err | |||
return nil, err // can't test because it's hard to create a scenario where this error happens |
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.
let's avoid adding these comments to actual code
@@ -763,7 +763,7 @@ func (v *pinotVisibilityStore) getCountWorkflowExecutionsQuery(tableName string, | |||
comparExpr, err := v.pinotQueryValidator.ValidateQuery(comparExpr) | |||
if err != nil { | |||
v.logger.Error(fmt.Sprintf("pinot query validator error: %s", err)) | |||
} | |||
} // can't test because it's hard to create a scenario where this error happens |
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.
we could mock some things inside ValidateQuery
to mimic this failure but I don't think it's crucial
Codecov Report
Additional details and impacted filessee 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Pull Request Test Coverage Report for Build 018e165c-69ea-4fe2-bec4-e679416f98baDetails
💛 - Coveralls |
What changed?
Added more unit tests to test error cases
Why?
To reach a higher code coverage (~95%)
How did you test it?
unti test
Potential risks
Release notes
Documentation Changes