-
Notifications
You must be signed in to change notification settings - Fork 452
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
test: add go test cases for txn-context-enabled
config
#2530
Conversation
txn_context_enabled
configtxn-context-enabled
config
txn-context-enabled
configtxn_context_enabled
config
txn_context_enabled
configtxn-context-enabled
config
} | ||
|
||
// / GenerateConfigsMatrix generates all possible combinations of config options | ||
func GenerateConfigsMatrix(configOptions []ConfigOptions) ([]KvrocksServerConfigs, error) { |
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.
So this only return false when options is error?
currentConfigBackup := make(KvrocksServerConfigs, len(currentConfig)) | ||
for k, v := range currentConfig { | ||
currentConfigBackup[k] = v | ||
} |
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.
Copying this might be heavy weight but lgtm since it's just testing...
Retrigger CI, would merge if all ci passed |
Quality Gate passedIssues Measures |
fix: #2514
I added a config test of
txn-context-enabled
to the not particularly time-consuming go test casesAlso, I've noticed that some of the tests have
resp3-enabled
related tests, which require multiple layers of nesting and branching if combined withtxn-context-enabled
.To alleviate this, I tried adding
util. GenerateConfigsMatrix
to generate possible config combinations, which you learn about by usingTestGenerateConfigsMatrix
inconfig_test.go
. At the moment, onlyYesNo
configs are supported, but I think this will provide some convenience for config-related testing, and we can support more types later if needed