-
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 unit test for history config #6334
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 28 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
LGTM
@@ -308,7 +279,6 @@ type Config struct { | |||
// EnableContextHeaderInVisibility whether to enable indexing context header in visibility | |||
EnableContextHeaderInVisibility dynamicconfig.BoolPropertyFnWithDomainFilter | |||
|
|||
EnableCrossClusterEngine dynamicconfig.BoolPropertyFn | |||
EnableCrossClusterOperationsForDomain dynamicconfig.BoolPropertyFnWithDomainFilter |
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.
kinda surprising this doesn't go away, if the whole cross-cluster thing is gone
"GlobalRatelimiterGCAfter": {dynamicconfig.HistoryGlobalRatelimiterGCAfter, time.Second}, | ||
"HostName": {nil, hostname}, | ||
} | ||
client := dynamicconfig.NewInMemoryClient() | ||
for fieldName, expected := range fields { | ||
if expected.key != nil { | ||
err := client.UpdateValue(expected.key, expected.value) | ||
if err != nil { | ||
t.Errorf("Failed to update config for %s: %s", fieldName, err) | ||
} | ||
} | ||
} | ||
dc := dynamicconfig.NewCollection(client, testlogger.New(t)) |
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 kinda wonder if this would be better to do as a "pick a hashed value for whatever key was requested"... the keys and values sorta don't matter, just that they're predictable and come from the dynamic config.
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.
the values have types. And the type matters.
What changed?
Why?
Improve test coverage
How did you test it?
unit tests
Potential risks
Release notes
Documentation Changes