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

Test for rate limited wrappers around persistence clients #5518

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

3vilhamster
Copy link
Member

@3vilhamster 3vilhamster commented Dec 20, 2023

What changed?
Improving test coverage for rate limiter wrappers of persistence clients.
Persistence layer exposes rate limiter wrappers around all of the provided interfaces.
These wrappers do not have special logic, so now they are generated by template. I've added tests for existing clients to ensure behaviour. Though, it could be deleted later on.

Test coverage now is on 95%.

Why?
Improving test coverage and code readability.

How did you test it?
Unit tests

Potential risks

Release notes

Documentation Changes

Comment on lines +23 to +29
//go:generate gowrap gen -g -p . -i ConfigStoreManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/configstore.go
//go:generate gowrap gen -g -p . -i DomainManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/domain.go
//go:generate gowrap gen -g -p . -i HistoryManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/history.go
//go:generate gowrap gen -g -p . -i ExecutionManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/execution.go
//go:generate gowrap gen -g -p . -i QueueManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/queue.go
//go:generate gowrap gen -g -p . -i TaskManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/task.go
//go:generate gowrap gen -g -p . -i ShardManager -t ./ratelimited/template/ratelimited.tmpl -o ratelimited/shard.go
Copy link
Member

Choose a reason for hiding this comment

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

yaaay! very glad to see a bunch of these get standardized, manual upkeep for this kind of thing is pure waste and risk. thanks!

@3vilhamster 3vilhamster enabled auto-merge (squash) December 21, 2023 16:19
@3vilhamster 3vilhamster merged commit 3986fcd into cadence-workflow:master Dec 21, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants